In [5]:
%run /home/grg/git/alfa/nilearn-helper.py
import pandas as pd
from nilearn import image
import json
from glob import glob

def getdict(data, key, column, column2=None, value=None):
    import string
    if not value is None:
        data = data[data[column2] == value]
        
    d1 = dict([(string.atoi(str(int(e))), v) for e, v in data[[key, column]].to_dict(orient='split')['data']])
    return d1

In [3]:
wd = '/home/grg/spm'
alfad = '/home/grg/data/ALFA_DWI/'
demfp = osp.join(wd, 'data', 'Data_VBM_Alfa.csv')
demo = pd.read_csv(demfp)
fsvol_fp = osp.join(wd, 'data', 'aseg FS ALFA.xlsx')
jdgfp = osp.join(wd, 'data', 'Ventricular volumes.xlsx')

tivs = getdict(demo, 'Subj_ID', 'Tot Intracranial Volume (mm^3)')

vvol = pd.read_excel(fsvol_fp)
vvol_l = getdict(vvol, 'subject', 'Volume_mm3', 'StructName', 'Left-Lateral-Ventricle')
vvol_r = getdict(vvol, 'subject', 'Volume_mm3', 'StructName', 'Right-Lateral-Ventricle')
vvol_li = getdict(vvol, 'subject', 'Volume_mm3', 'StructName','Left-Inf-Lat-Vent')
vvol_ri = getdict(vvol, 'subject', 'Volume_mm3', 'StructName','Right-Inf-Lat-Vent')
vvol_3 = getdict(vvol, 'subject', 'Volume_mm3', 'StructName','3rd-Ventricle')
vvol_4 = getdict(vvol, 'subject', 'Volume_mm3', 'StructName', '4th-Ventricle')

jdg = pd.read_excel(jdgfp)
jdg_tivs = getdict(jdg, 'subject', 'Total Intracranial Volume')
jdg_vvol = getdict(jdg, 'subject', 'Ventricular Volume')
jdg_vvol = dict([(e,v*1000) for e,v in jdg_vvol.items()])

subjects = json.load(open(osp.join(wd, 'data', 'subjects.json')))
genders = json.load(open(osp.join(wd, 'data', 'genders.json')))
educyears = json.load(open(osp.join(wd, 'data', 'educyears.json')))
ages = json.load(open(osp.join(wd, 'data', 'age.json')))
tivs = json.load(open(osp.join(wd, 'data', 'tiv.json')))
perid = osp.join(wd, 'ROIvent')
jacod = osp.join(wd, 'Jacobians')
mdd = osp.join(wd, 'MD')

In [244]:
groups_size = [102, 44, 143, 160, 65]
groups_names = ['Apoe2-3', 'Apoe2-4', 'Apoe3-3', 'Apoe3-4', 'Apoe4-4']

groups = []
start = 0
for size in groups_size:
    g = subjects[start:start + size]
    start = start + size
    groups.append(g)

data = []
for s in subjects:
    try:
        print s
        perifp = glob(osp.join(perid, '%s_latvent_dilated.nii.gz'%s))[0]
        print perifp
        #jacofp = glob(osp.join(jacod, 's6j_t1_%s.nii'%s))[0]
        mdfp = glob(osp.join(mdd, '%s*_MD_MNIspace_s.nii'%s))[0]
        mdt1fp = glob(osp.join(alfad, '%s*'%s, 'DWI', '%s*_MD_t1space.nii.gz'%s))[0]
        
        md = np.array(nib.load(mdt1fp).dataobj)
        peri = np.array(nib.load(perifp).dataobj)
        mdl = np.mean(md[np.abs(peri-1)<0.5])
        mdr = np.mean(md[np.abs(peri-2)<0.5])
        
        age = ages[str(s)]
        group = [s in each for each in groups].index(True)
        ey = educyears[str(s)]
        jdgvol = jdg_vvol[s]
        gender = genders[str(s)]
        vl = vvol_l[s]# / tivs[str(s)]# +vvol_li[s]
        vr = vvol_r[s]# / tivs[str(s)]# + vvol_ri[s]
                
        row = [s, group, age, age*age, gender, ey, mdl, mdr, vl, vr]
        data.append(row)
        
    except IndexError as e:
        print s, e


10070
/home/grg/spm/ROIvent/10070_latvent_dilated.nii.gz
10102
/home/grg/spm/ROIvent/10102_latvent_dilated.nii.gz
10108
/home/grg/spm/ROIvent/10108_latvent_dilated.nii.gz
10235
/home/grg/spm/ROIvent/10235_latvent_dilated.nii.gz
10365
/home/grg/spm/ROIvent/10365_latvent_dilated.nii.gz
10419
/home/grg/spm/ROIvent/10419_latvent_dilated.nii.gz
10463
/home/grg/spm/ROIvent/10463_latvent_dilated.nii.gz
10530
/home/grg/spm/ROIvent/10530_latvent_dilated.nii.gz
10551
/home/grg/spm/ROIvent/10551_latvent_dilated.nii.gz
10563
/home/grg/spm/ROIvent/10563_latvent_dilated.nii.gz
10576
/home/grg/spm/ROIvent/10576_latvent_dilated.nii.gz
10630
/home/grg/spm/ROIvent/10630_latvent_dilated.nii.gz
10668
/home/grg/spm/ROIvent/10668_latvent_dilated.nii.gz
10692
/home/grg/spm/ROIvent/10692_latvent_dilated.nii.gz
10693
/home/grg/spm/ROIvent/10693_latvent_dilated.nii.gz
10703
/home/grg/spm/ROIvent/10703_latvent_dilated.nii.gz
10725
/home/grg/spm/ROIvent/10725_latvent_dilated.nii.gz
10737
/home/grg/spm/ROIvent/10737_latvent_dilated.nii.gz
10756
/home/grg/spm/ROIvent/10756_latvent_dilated.nii.gz
10809
/home/grg/spm/ROIvent/10809_latvent_dilated.nii.gz
11045
/home/grg/spm/ROIvent/11045_latvent_dilated.nii.gz
11047
/home/grg/spm/ROIvent/11047_latvent_dilated.nii.gz
11048
/home/grg/spm/ROIvent/11048_latvent_dilated.nii.gz
11133
/home/grg/spm/ROIvent/11133_latvent_dilated.nii.gz
11180
/home/grg/spm/ROIvent/11180_latvent_dilated.nii.gz
11225
/home/grg/spm/ROIvent/11225_latvent_dilated.nii.gz
11262
/home/grg/spm/ROIvent/11262_latvent_dilated.nii.gz
11305
/home/grg/spm/ROIvent/11305_latvent_dilated.nii.gz
11351
/home/grg/spm/ROIvent/11351_latvent_dilated.nii.gz
11360
/home/grg/spm/ROIvent/11360_latvent_dilated.nii.gz
11387
/home/grg/spm/ROIvent/11387_latvent_dilated.nii.gz
11407
/home/grg/spm/ROIvent/11407_latvent_dilated.nii.gz
11414
/home/grg/spm/ROIvent/11414_latvent_dilated.nii.gz
11416
/home/grg/spm/ROIvent/11416_latvent_dilated.nii.gz
11550
/home/grg/spm/ROIvent/11550_latvent_dilated.nii.gz
11610
/home/grg/spm/ROIvent/11610_latvent_dilated.nii.gz
11614
/home/grg/spm/ROIvent/11614_latvent_dilated.nii.gz
11638
/home/grg/spm/ROIvent/11638_latvent_dilated.nii.gz
11658
/home/grg/spm/ROIvent/11658_latvent_dilated.nii.gz
11691
/home/grg/spm/ROIvent/11691_latvent_dilated.nii.gz
11721
/home/grg/spm/ROIvent/11721_latvent_dilated.nii.gz
11737
/home/grg/spm/ROIvent/11737_latvent_dilated.nii.gz
11768
/home/grg/spm/ROIvent/11768_latvent_dilated.nii.gz
11798
/home/grg/spm/ROIvent/11798_latvent_dilated.nii.gz
11803
/home/grg/spm/ROIvent/11803_latvent_dilated.nii.gz
11858
/home/grg/spm/ROIvent/11858_latvent_dilated.nii.gz
11902
/home/grg/spm/ROIvent/11902_latvent_dilated.nii.gz
11941
/home/grg/spm/ROIvent/11941_latvent_dilated.nii.gz
11975
/home/grg/spm/ROIvent/11975_latvent_dilated.nii.gz
11979
/home/grg/spm/ROIvent/11979_latvent_dilated.nii.gz
12032
/home/grg/spm/ROIvent/12032_latvent_dilated.nii.gz
12067
/home/grg/spm/ROIvent/12067_latvent_dilated.nii.gz
12079
/home/grg/spm/ROIvent/12079_latvent_dilated.nii.gz
12121
/home/grg/spm/ROIvent/12121_latvent_dilated.nii.gz
12140
/home/grg/spm/ROIvent/12140_latvent_dilated.nii.gz
12174
/home/grg/spm/ROIvent/12174_latvent_dilated.nii.gz
12244
/home/grg/spm/ROIvent/12244_latvent_dilated.nii.gz
12252
/home/grg/spm/ROIvent/12252_latvent_dilated.nii.gz
12323
/home/grg/spm/ROIvent/12323_latvent_dilated.nii.gz
12324
/home/grg/spm/ROIvent/12324_latvent_dilated.nii.gz
12331
/home/grg/spm/ROIvent/12331_latvent_dilated.nii.gz
12399
/home/grg/spm/ROIvent/12399_latvent_dilated.nii.gz
12425
/home/grg/spm/ROIvent/12425_latvent_dilated.nii.gz
12445
/home/grg/spm/ROIvent/12445_latvent_dilated.nii.gz
12479
/home/grg/spm/ROIvent/12479_latvent_dilated.nii.gz
12484
/home/grg/spm/ROIvent/12484_latvent_dilated.nii.gz
12493
/home/grg/spm/ROIvent/12493_latvent_dilated.nii.gz
12516
/home/grg/spm/ROIvent/12516_latvent_dilated.nii.gz
12637
/home/grg/spm/ROIvent/12637_latvent_dilated.nii.gz
12659
/home/grg/spm/ROIvent/12659_latvent_dilated.nii.gz
12730
/home/grg/spm/ROIvent/12730_latvent_dilated.nii.gz
12783
/home/grg/spm/ROIvent/12783_latvent_dilated.nii.gz
12787
/home/grg/spm/ROIvent/12787_latvent_dilated.nii.gz
12841
/home/grg/spm/ROIvent/12841_latvent_dilated.nii.gz
12920
/home/grg/spm/ROIvent/12920_latvent_dilated.nii.gz
12970
/home/grg/spm/ROIvent/12970_latvent_dilated.nii.gz
12976
/home/grg/spm/ROIvent/12976_latvent_dilated.nii.gz
13008
/home/grg/spm/ROIvent/13008_latvent_dilated.nii.gz
13035
/home/grg/spm/ROIvent/13035_latvent_dilated.nii.gz
13075
/home/grg/spm/ROIvent/13075_latvent_dilated.nii.gz
13090
/home/grg/spm/ROIvent/13090_latvent_dilated.nii.gz
13118
/home/grg/spm/ROIvent/13118_latvent_dilated.nii.gz
13138
/home/grg/spm/ROIvent/13138_latvent_dilated.nii.gz
13235
/home/grg/spm/ROIvent/13235_latvent_dilated.nii.gz
21092
/home/grg/spm/ROIvent/21092_latvent_dilated.nii.gz
44046
/home/grg/spm/ROIvent/44046_latvent_dilated.nii.gz
44205
/home/grg/spm/ROIvent/44205_latvent_dilated.nii.gz
55166
/home/grg/spm/ROIvent/55166_latvent_dilated.nii.gz
55529
/home/grg/spm/ROIvent/55529_latvent_dilated.nii.gz
55538
/home/grg/spm/ROIvent/55538_latvent_dilated.nii.gz
55854
/home/grg/spm/ROIvent/55854_latvent_dilated.nii.gz
66089
/home/grg/spm/ROIvent/66089_latvent_dilated.nii.gz
66125
/home/grg/spm/ROIvent/66125_latvent_dilated.nii.gz
66159
/home/grg/spm/ROIvent/66159_latvent_dilated.nii.gz
66239
/home/grg/spm/ROIvent/66239_latvent_dilated.nii.gz
66240
/home/grg/spm/ROIvent/66240_latvent_dilated.nii.gz
66270
/home/grg/spm/ROIvent/66270_latvent_dilated.nii.gz
66312
/home/grg/spm/ROIvent/66312_latvent_dilated.nii.gz
77068
/home/grg/spm/ROIvent/77068_latvent_dilated.nii.gz
77093
/home/grg/spm/ROIvent/77093_latvent_dilated.nii.gz
77094
/home/grg/spm/ROIvent/77094_latvent_dilated.nii.gz
77195
/home/grg/spm/ROIvent/77195_latvent_dilated.nii.gz
10015
/home/grg/spm/ROIvent/10015_latvent_dilated.nii.gz
10041
/home/grg/spm/ROIvent/10041_latvent_dilated.nii.gz
10090
/home/grg/spm/ROIvent/10090_latvent_dilated.nii.gz
10150
/home/grg/spm/ROIvent/10150_latvent_dilated.nii.gz
10282
/home/grg/spm/ROIvent/10282_latvent_dilated.nii.gz
10486
/home/grg/spm/ROIvent/10486_latvent_dilated.nii.gz
10518
/home/grg/spm/ROIvent/10518_latvent_dilated.nii.gz
10536
/home/grg/spm/ROIvent/10536_latvent_dilated.nii.gz
10645
/home/grg/spm/ROIvent/10645_latvent_dilated.nii.gz
11038
/home/grg/spm/ROIvent/11038_latvent_dilated.nii.gz
11144
/home/grg/spm/ROIvent/11144_latvent_dilated.nii.gz
11191
/home/grg/spm/ROIvent/11191_latvent_dilated.nii.gz
11195
/home/grg/spm/ROIvent/11195_latvent_dilated.nii.gz
11252
/home/grg/spm/ROIvent/11252_latvent_dilated.nii.gz
11436
/home/grg/spm/ROIvent/11436_latvent_dilated.nii.gz
11597
/home/grg/spm/ROIvent/11597_latvent_dilated.nii.gz
12015
/home/grg/spm/ROIvent/12015_latvent_dilated.nii.gz
12122
/home/grg/spm/ROIvent/12122_latvent_dilated.nii.gz
12245
/home/grg/spm/ROIvent/12245_latvent_dilated.nii.gz
12417
/home/grg/spm/ROIvent/12417_latvent_dilated.nii.gz
12704
/home/grg/spm/ROIvent/12704_latvent_dilated.nii.gz
12772
/home/grg/spm/ROIvent/12772_latvent_dilated.nii.gz
12930
/home/grg/spm/ROIvent/12930_latvent_dilated.nii.gz
13054
/home/grg/spm/ROIvent/13054_latvent_dilated.nii.gz
13070
/home/grg/spm/ROIvent/13070_latvent_dilated.nii.gz
21002
/home/grg/spm/ROIvent/21002_latvent_dilated.nii.gz
21011
/home/grg/spm/ROIvent/21011_latvent_dilated.nii.gz
55351
/home/grg/spm/ROIvent/55351_latvent_dilated.nii.gz
55353
/home/grg/spm/ROIvent/55353_latvent_dilated.nii.gz
55355
/home/grg/spm/ROIvent/55355_latvent_dilated.nii.gz
55488
/home/grg/spm/ROIvent/55488_latvent_dilated.nii.gz
55539
/home/grg/spm/ROIvent/55539_latvent_dilated.nii.gz
55636
/home/grg/spm/ROIvent/55636_latvent_dilated.nii.gz
55793
/home/grg/spm/ROIvent/55793_latvent_dilated.nii.gz
66020
/home/grg/spm/ROIvent/66020_latvent_dilated.nii.gz
66094
/home/grg/spm/ROIvent/66094_latvent_dilated.nii.gz
66164
/home/grg/spm/ROIvent/66164_latvent_dilated.nii.gz
66341
/home/grg/spm/ROIvent/66341_latvent_dilated.nii.gz
66492
/home/grg/spm/ROIvent/66492_latvent_dilated.nii.gz
77109
/home/grg/spm/ROIvent/77109_latvent_dilated.nii.gz
77152
/home/grg/spm/ROIvent/77152_latvent_dilated.nii.gz
77191
/home/grg/spm/ROIvent/77191_latvent_dilated.nii.gz
77224
/home/grg/spm/ROIvent/77224_latvent_dilated.nii.gz
77241
/home/grg/spm/ROIvent/77241_latvent_dilated.nii.gz
10013
/home/grg/spm/ROIvent/10013_latvent_dilated.nii.gz
10023
/home/grg/spm/ROIvent/10023_latvent_dilated.nii.gz
10024
/home/grg/spm/ROIvent/10024_latvent_dilated.nii.gz
10028
/home/grg/spm/ROIvent/10028_latvent_dilated.nii.gz
10032
/home/grg/spm/ROIvent/10032_latvent_dilated.nii.gz
10036
/home/grg/spm/ROIvent/10036_latvent_dilated.nii.gz
10038
/home/grg/spm/ROIvent/10038_latvent_dilated.nii.gz
10040
/home/grg/spm/ROIvent/10040_latvent_dilated.nii.gz
10042
/home/grg/spm/ROIvent/10042_latvent_dilated.nii.gz
10049
/home/grg/spm/ROIvent/10049_latvent_dilated.nii.gz
10052
/home/grg/spm/ROIvent/10052_latvent_dilated.nii.gz
10053
/home/grg/spm/ROIvent/10053_latvent_dilated.nii.gz
10056
/home/grg/spm/ROIvent/10056_latvent_dilated.nii.gz
10081
/home/grg/spm/ROIvent/10081_latvent_dilated.nii.gz
10117
/home/grg/spm/ROIvent/10117_latvent_dilated.nii.gz
10118
/home/grg/spm/ROIvent/10118_latvent_dilated.nii.gz
10151
/home/grg/spm/ROIvent/10151_latvent_dilated.nii.gz
10156
/home/grg/spm/ROIvent/10156_latvent_dilated.nii.gz
10158
/home/grg/spm/ROIvent/10158_latvent_dilated.nii.gz
10166
/home/grg/spm/ROIvent/10166_latvent_dilated.nii.gz
10170
/home/grg/spm/ROIvent/10170_latvent_dilated.nii.gz
10178
/home/grg/spm/ROIvent/10178_latvent_dilated.nii.gz
10182
/home/grg/spm/ROIvent/10182_latvent_dilated.nii.gz
10199
/home/grg/spm/ROIvent/10199_latvent_dilated.nii.gz
10200
/home/grg/spm/ROIvent/10200_latvent_dilated.nii.gz
10213
/home/grg/spm/ROIvent/10213_latvent_dilated.nii.gz
10217
/home/grg/spm/ROIvent/10217_latvent_dilated.nii.gz
10239
/home/grg/spm/ROIvent/10239_latvent_dilated.nii.gz
10242
/home/grg/spm/ROIvent/10242_latvent_dilated.nii.gz
10245
/home/grg/spm/ROIvent/10245_latvent_dilated.nii.gz
10248
/home/grg/spm/ROIvent/10248_latvent_dilated.nii.gz
10251
/home/grg/spm/ROIvent/10251_latvent_dilated.nii.gz
10253
/home/grg/spm/ROIvent/10253_latvent_dilated.nii.gz
10263
/home/grg/spm/ROIvent/10263_latvent_dilated.nii.gz
10265
/home/grg/spm/ROIvent/10265_latvent_dilated.nii.gz
10308
/home/grg/spm/ROIvent/10308_latvent_dilated.nii.gz
10313
/home/grg/spm/ROIvent/10313_latvent_dilated.nii.gz
10322
/home/grg/spm/ROIvent/10322_latvent_dilated.nii.gz
10325
/home/grg/spm/ROIvent/10325_latvent_dilated.nii.gz
10326
/home/grg/spm/ROIvent/10326_latvent_dilated.nii.gz
10329
/home/grg/spm/ROIvent/10329_latvent_dilated.nii.gz
10330
/home/grg/spm/ROIvent/10330_latvent_dilated.nii.gz
10354
/home/grg/spm/ROIvent/10354_latvent_dilated.nii.gz
10370
/home/grg/spm/ROIvent/10370_latvent_dilated.nii.gz
10385
/home/grg/spm/ROIvent/10385_latvent_dilated.nii.gz
10393
/home/grg/spm/ROIvent/10393_latvent_dilated.nii.gz
10417
/home/grg/spm/ROIvent/10417_latvent_dilated.nii.gz
10426
/home/grg/spm/ROIvent/10426_latvent_dilated.nii.gz
10528
/home/grg/spm/ROIvent/10528_latvent_dilated.nii.gz
10577
/home/grg/spm/ROIvent/10577_latvent_dilated.nii.gz
10678
/home/grg/spm/ROIvent/10678_latvent_dilated.nii.gz
10682
/home/grg/spm/ROIvent/10682_latvent_dilated.nii.gz
10697
/home/grg/spm/ROIvent/10697_latvent_dilated.nii.gz
10724
/home/grg/spm/ROIvent/10724_latvent_dilated.nii.gz
10821
/home/grg/spm/ROIvent/10821_latvent_dilated.nii.gz
10841
/home/grg/spm/ROIvent/10841_latvent_dilated.nii.gz
10850
/home/grg/spm/ROIvent/10850_latvent_dilated.nii.gz
10855
/home/grg/spm/ROIvent/10855_latvent_dilated.nii.gz
10858
/home/grg/spm/ROIvent/10858_latvent_dilated.nii.gz
10894
/home/grg/spm/ROIvent/10894_latvent_dilated.nii.gz
10900
/home/grg/spm/ROIvent/10900_latvent_dilated.nii.gz
10942
/home/grg/spm/ROIvent/10942_latvent_dilated.nii.gz
10946
/home/grg/spm/ROIvent/10946_latvent_dilated.nii.gz
11030
/home/grg/spm/ROIvent/11030_latvent_dilated.nii.gz
11063
/home/grg/spm/ROIvent/11063_latvent_dilated.nii.gz
11136
/home/grg/spm/ROIvent/11136_latvent_dilated.nii.gz
11137
/home/grg/spm/ROIvent/11137_latvent_dilated.nii.gz
11139
/home/grg/spm/ROIvent/11139_latvent_dilated.nii.gz
11152
/home/grg/spm/ROIvent/11152_latvent_dilated.nii.gz
11184
/home/grg/spm/ROIvent/11184_latvent_dilated.nii.gz
11257
/home/grg/spm/ROIvent/11257_latvent_dilated.nii.gz
11264
/home/grg/spm/ROIvent/11264_latvent_dilated.nii.gz
11426
/home/grg/spm/ROIvent/11426_latvent_dilated.nii.gz
11478
/home/grg/spm/ROIvent/11478_latvent_dilated.nii.gz
11590
/home/grg/spm/ROIvent/11590_latvent_dilated.nii.gz
11620
/home/grg/spm/ROIvent/11620_latvent_dilated.nii.gz
11679
/home/grg/spm/ROIvent/11679_latvent_dilated.nii.gz
11686
/home/grg/spm/ROIvent/11686_latvent_dilated.nii.gz
11830
/home/grg/spm/ROIvent/11830_latvent_dilated.nii.gz
12138
/home/grg/spm/ROIvent/12138_latvent_dilated.nii.gz
12239
/home/grg/spm/ROIvent/12239_latvent_dilated.nii.gz
12279
/home/grg/spm/ROIvent/12279_latvent_dilated.nii.gz
12327
/home/grg/spm/ROIvent/12327_latvent_dilated.nii.gz
12624
/home/grg/spm/ROIvent/12624_latvent_dilated.nii.gz
12699
/home/grg/spm/ROIvent/12699_latvent_dilated.nii.gz
12767
/home/grg/spm/ROIvent/12767_latvent_dilated.nii.gz
12861
/home/grg/spm/ROIvent/12861_latvent_dilated.nii.gz
12904
/home/grg/spm/ROIvent/12904_latvent_dilated.nii.gz
13059
/home/grg/spm/ROIvent/13059_latvent_dilated.nii.gz
13061
/home/grg/spm/ROIvent/13061_latvent_dilated.nii.gz
13144
/home/grg/spm/ROIvent/13144_latvent_dilated.nii.gz
13169
/home/grg/spm/ROIvent/13169_latvent_dilated.nii.gz
13188
/home/grg/spm/ROIvent/13188_latvent_dilated.nii.gz
13214
/home/grg/spm/ROIvent/13214_latvent_dilated.nii.gz
13215
/home/grg/spm/ROIvent/13215_latvent_dilated.nii.gz
13217
/home/grg/spm/ROIvent/13217_latvent_dilated.nii.gz
13238
/home/grg/spm/ROIvent/13238_latvent_dilated.nii.gz
13242
/home/grg/spm/ROIvent/13242_latvent_dilated.nii.gz
13312
/home/grg/spm/ROIvent/13312_latvent_dilated.nii.gz
13367
/home/grg/spm/ROIvent/13367_latvent_dilated.nii.gz
21042
/home/grg/spm/ROIvent/21042_latvent_dilated.nii.gz
21057
/home/grg/spm/ROIvent/21057_latvent_dilated.nii.gz
21073
/home/grg/spm/ROIvent/21073_latvent_dilated.nii.gz
44068
/home/grg/spm/ROIvent/44068_latvent_dilated.nii.gz
44091
/home/grg/spm/ROIvent/44091_latvent_dilated.nii.gz
44094
/home/grg/spm/ROIvent/44094_latvent_dilated.nii.gz
44119
/home/grg/spm/ROIvent/44119_latvent_dilated.nii.gz
44141
/home/grg/spm/ROIvent/44141_latvent_dilated.nii.gz
44151
/home/grg/spm/ROIvent/44151_latvent_dilated.nii.gz
44723
/home/grg/spm/ROIvent/44723_latvent_dilated.nii.gz
55057
/home/grg/spm/ROIvent/55057_latvent_dilated.nii.gz
55152
/home/grg/spm/ROIvent/55152_latvent_dilated.nii.gz
55216
/home/grg/spm/ROIvent/55216_latvent_dilated.nii.gz
55297
/home/grg/spm/ROIvent/55297_latvent_dilated.nii.gz
55323
/home/grg/spm/ROIvent/55323_latvent_dilated.nii.gz
55370
/home/grg/spm/ROIvent/55370_latvent_dilated.nii.gz
55469
/home/grg/spm/ROIvent/55469_latvent_dilated.nii.gz
55778
/home/grg/spm/ROIvent/55778_latvent_dilated.nii.gz
66019
/home/grg/spm/ROIvent/66019_latvent_dilated.nii.gz
66030
/home/grg/spm/ROIvent/66030_latvent_dilated.nii.gz
66042
/home/grg/spm/ROIvent/66042_latvent_dilated.nii.gz
66048
/home/grg/spm/ROIvent/66048_latvent_dilated.nii.gz
66050
/home/grg/spm/ROIvent/66050_latvent_dilated.nii.gz
66128
/home/grg/spm/ROIvent/66128_latvent_dilated.nii.gz
66133
/home/grg/spm/ROIvent/66133_latvent_dilated.nii.gz
66141
/home/grg/spm/ROIvent/66141_latvent_dilated.nii.gz
66169
/home/grg/spm/ROIvent/66169_latvent_dilated.nii.gz
66183
/home/grg/spm/ROIvent/66183_latvent_dilated.nii.gz
66264
/home/grg/spm/ROIvent/66264_latvent_dilated.nii.gz
66267
/home/grg/spm/ROIvent/66267_latvent_dilated.nii.gz
66268
/home/grg/spm/ROIvent/66268_latvent_dilated.nii.gz
66293
/home/grg/spm/ROIvent/66293_latvent_dilated.nii.gz
66335
/home/grg/spm/ROIvent/66335_latvent_dilated.nii.gz
66361
/home/grg/spm/ROIvent/66361_latvent_dilated.nii.gz
66498
/home/grg/spm/ROIvent/66498_latvent_dilated.nii.gz
77024
/home/grg/spm/ROIvent/77024_latvent_dilated.nii.gz
77037
/home/grg/spm/ROIvent/77037_latvent_dilated.nii.gz
77076
/home/grg/spm/ROIvent/77076_latvent_dilated.nii.gz
77151
/home/grg/spm/ROIvent/77151_latvent_dilated.nii.gz
77175
/home/grg/spm/ROIvent/77175_latvent_dilated.nii.gz
77188
/home/grg/spm/ROIvent/77188_latvent_dilated.nii.gz
77252
/home/grg/spm/ROIvent/77252_latvent_dilated.nii.gz
77263
/home/grg/spm/ROIvent/77263_latvent_dilated.nii.gz
10016
/home/grg/spm/ROIvent/10016_latvent_dilated.nii.gz
10025
/home/grg/spm/ROIvent/10025_latvent_dilated.nii.gz
10026
/home/grg/spm/ROIvent/10026_latvent_dilated.nii.gz
10029
/home/grg/spm/ROIvent/10029_latvent_dilated.nii.gz
10034
/home/grg/spm/ROIvent/10034_latvent_dilated.nii.gz
10035
/home/grg/spm/ROIvent/10035_latvent_dilated.nii.gz
10051
/home/grg/spm/ROIvent/10051_latvent_dilated.nii.gz
10099
/home/grg/spm/ROIvent/10099_latvent_dilated.nii.gz
10106
/home/grg/spm/ROIvent/10106_latvent_dilated.nii.gz
10134
/home/grg/spm/ROIvent/10134_latvent_dilated.nii.gz
10160
/home/grg/spm/ROIvent/10160_latvent_dilated.nii.gz
10162
/home/grg/spm/ROIvent/10162_latvent_dilated.nii.gz
10225
/home/grg/spm/ROIvent/10225_latvent_dilated.nii.gz
10226
/home/grg/spm/ROIvent/10226_latvent_dilated.nii.gz
10259
/home/grg/spm/ROIvent/10259_latvent_dilated.nii.gz
10317
/home/grg/spm/ROIvent/10317_latvent_dilated.nii.gz
10319
/home/grg/spm/ROIvent/10319_latvent_dilated.nii.gz
10324
/home/grg/spm/ROIvent/10324_latvent_dilated.nii.gz
10333
/home/grg/spm/ROIvent/10333_latvent_dilated.nii.gz
10338
/home/grg/spm/ROIvent/10338_latvent_dilated.nii.gz
10346
/home/grg/spm/ROIvent/10346_latvent_dilated.nii.gz
10361
/home/grg/spm/ROIvent/10361_latvent_dilated.nii.gz
10362
/home/grg/spm/ROIvent/10362_latvent_dilated.nii.gz
10396
/home/grg/spm/ROIvent/10396_latvent_dilated.nii.gz
10397
/home/grg/spm/ROIvent/10397_latvent_dilated.nii.gz
10416
/home/grg/spm/ROIvent/10416_latvent_dilated.nii.gz
10418
/home/grg/spm/ROIvent/10418_latvent_dilated.nii.gz
10433
/home/grg/spm/ROIvent/10433_latvent_dilated.nii.gz
10436
/home/grg/spm/ROIvent/10436_latvent_dilated.nii.gz
10450
/home/grg/spm/ROIvent/10450_latvent_dilated.nii.gz
10453
/home/grg/spm/ROIvent/10453_latvent_dilated.nii.gz
10461
/home/grg/spm/ROIvent/10461_latvent_dilated.nii.gz
10482
/home/grg/spm/ROIvent/10482_latvent_dilated.nii.gz
10493
/home/grg/spm/ROIvent/10493_latvent_dilated.nii.gz
10504
/home/grg/spm/ROIvent/10504_latvent_dilated.nii.gz
10522
/home/grg/spm/ROIvent/10522_latvent_dilated.nii.gz
10538
/home/grg/spm/ROIvent/10538_latvent_dilated.nii.gz
10541
/home/grg/spm/ROIvent/10541_latvent_dilated.nii.gz
10550
/home/grg/spm/ROIvent/10550_latvent_dilated.nii.gz
10593
/home/grg/spm/ROIvent/10593_latvent_dilated.nii.gz
10634
/home/grg/spm/ROIvent/10634_latvent_dilated.nii.gz
10657
/home/grg/spm/ROIvent/10657_latvent_dilated.nii.gz
10696
/home/grg/spm/ROIvent/10696_latvent_dilated.nii.gz
10735
/home/grg/spm/ROIvent/10735_latvent_dilated.nii.gz
10741
/home/grg/spm/ROIvent/10741_latvent_dilated.nii.gz
10744
/home/grg/spm/ROIvent/10744_latvent_dilated.nii.gz
10750
/home/grg/spm/ROIvent/10750_latvent_dilated.nii.gz
10778
/home/grg/spm/ROIvent/10778_latvent_dilated.nii.gz
10787
/home/grg/spm/ROIvent/10787_latvent_dilated.nii.gz
10794
/home/grg/spm/ROIvent/10794_latvent_dilated.nii.gz
10811
/home/grg/spm/ROIvent/10811_latvent_dilated.nii.gz
10822
/home/grg/spm/ROIvent/10822_latvent_dilated.nii.gz
10846
/home/grg/spm/ROIvent/10846_latvent_dilated.nii.gz
10870
/home/grg/spm/ROIvent/10870_latvent_dilated.nii.gz
10881
/home/grg/spm/ROIvent/10881_latvent_dilated.nii.gz
10901
/home/grg/spm/ROIvent/10901_latvent_dilated.nii.gz
10944
/home/grg/spm/ROIvent/10944_latvent_dilated.nii.gz
10972
/home/grg/spm/ROIvent/10972_latvent_dilated.nii.gz
10988
/home/grg/spm/ROIvent/10988_latvent_dilated.nii.gz
11007
/home/grg/spm/ROIvent/11007_latvent_dilated.nii.gz
11012
/home/grg/spm/ROIvent/11012_latvent_dilated.nii.gz
11019
/home/grg/spm/ROIvent/11019_latvent_dilated.nii.gz
11054
/home/grg/spm/ROIvent/11054_latvent_dilated.nii.gz
11092
/home/grg/spm/ROIvent/11092_latvent_dilated.nii.gz
11127
/home/grg/spm/ROIvent/11127_latvent_dilated.nii.gz
11156
/home/grg/spm/ROIvent/11156_latvent_dilated.nii.gz
11196
/home/grg/spm/ROIvent/11196_latvent_dilated.nii.gz
11201
/home/grg/spm/ROIvent/11201_latvent_dilated.nii.gz
11219
/home/grg/spm/ROIvent/11219_latvent_dilated.nii.gz
11222
/home/grg/spm/ROIvent/11222_latvent_dilated.nii.gz
11245
/home/grg/spm/ROIvent/11245_latvent_dilated.nii.gz
11247
/home/grg/spm/ROIvent/11247_latvent_dilated.nii.gz
11254
/home/grg/spm/ROIvent/11254_latvent_dilated.nii.gz
11292
/home/grg/spm/ROIvent/11292_latvent_dilated.nii.gz
11323
/home/grg/spm/ROIvent/11323_latvent_dilated.nii.gz
11327
/home/grg/spm/ROIvent/11327_latvent_dilated.nii.gz
11355
/home/grg/spm/ROIvent/11355_latvent_dilated.nii.gz
11383
/home/grg/spm/ROIvent/11383_latvent_dilated.nii.gz
11415
/home/grg/spm/ROIvent/11415_latvent_dilated.nii.gz
11458
/home/grg/spm/ROIvent/11458_latvent_dilated.nii.gz
11461
/home/grg/spm/ROIvent/11461_latvent_dilated.nii.gz
11474
/home/grg/spm/ROIvent/11474_latvent_dilated.nii.gz
11481
/home/grg/spm/ROIvent/11481_latvent_dilated.nii.gz
11514
/home/grg/spm/ROIvent/11514_latvent_dilated.nii.gz
11552
/home/grg/spm/ROIvent/11552_latvent_dilated.nii.gz
11583
/home/grg/spm/ROIvent/11583_latvent_dilated.nii.gz
11630
/home/grg/spm/ROIvent/11630_latvent_dilated.nii.gz
11641
/home/grg/spm/ROIvent/11641_latvent_dilated.nii.gz
11747
/home/grg/spm/ROIvent/11747_latvent_dilated.nii.gz
11778
/home/grg/spm/ROIvent/11778_latvent_dilated.nii.gz
11850
/home/grg/spm/ROIvent/11850_latvent_dilated.nii.gz
11872
/home/grg/spm/ROIvent/11872_latvent_dilated.nii.gz
11937
/home/grg/spm/ROIvent/11937_latvent_dilated.nii.gz
11943
/home/grg/spm/ROIvent/11943_latvent_dilated.nii.gz
12056
/home/grg/spm/ROIvent/12056_latvent_dilated.nii.gz
12186
/home/grg/spm/ROIvent/12186_latvent_dilated.nii.gz
12269
/home/grg/spm/ROIvent/12269_latvent_dilated.nii.gz
12296
/home/grg/spm/ROIvent/12296_latvent_dilated.nii.gz
12379
/home/grg/spm/ROIvent/12379_latvent_dilated.nii.gz
12409
/home/grg/spm/ROIvent/12409_latvent_dilated.nii.gz
12548
/home/grg/spm/ROIvent/12548_latvent_dilated.nii.gz
12715
/home/grg/spm/ROIvent/12715_latvent_dilated.nii.gz
12724
/home/grg/spm/ROIvent/12724_latvent_dilated.nii.gz
12771
/home/grg/spm/ROIvent/12771_latvent_dilated.nii.gz
12778
/home/grg/spm/ROIvent/12778_latvent_dilated.nii.gz
12810
/home/grg/spm/ROIvent/12810_latvent_dilated.nii.gz
12812
/home/grg/spm/ROIvent/12812_latvent_dilated.nii.gz
12823
/home/grg/spm/ROIvent/12823_latvent_dilated.nii.gz
12858
/home/grg/spm/ROIvent/12858_latvent_dilated.nii.gz
12874
/home/grg/spm/ROIvent/12874_latvent_dilated.nii.gz
12878
/home/grg/spm/ROIvent/12878_latvent_dilated.nii.gz
12941
/home/grg/spm/ROIvent/12941_latvent_dilated.nii.gz
12947
/home/grg/spm/ROIvent/12947_latvent_dilated.nii.gz
12995
/home/grg/spm/ROIvent/12995_latvent_dilated.nii.gz
13019
/home/grg/spm/ROIvent/13019_latvent_dilated.nii.gz
13043
/home/grg/spm/ROIvent/13043_latvent_dilated.nii.gz
13049
/home/grg/spm/ROIvent/13049_latvent_dilated.nii.gz
13063
/home/grg/spm/ROIvent/13063_latvent_dilated.nii.gz
13105
/home/grg/spm/ROIvent/13105_latvent_dilated.nii.gz
13127
/home/grg/spm/ROIvent/13127_latvent_dilated.nii.gz
13151
/home/grg/spm/ROIvent/13151_latvent_dilated.nii.gz
13236
/home/grg/spm/ROIvent/13236_latvent_dilated.nii.gz
13268
/home/grg/spm/ROIvent/13268_latvent_dilated.nii.gz
13293
/home/grg/spm/ROIvent/13293_latvent_dilated.nii.gz
13309
/home/grg/spm/ROIvent/13309_latvent_dilated.nii.gz
13322
/home/grg/spm/ROIvent/13322_latvent_dilated.nii.gz
13417
/home/grg/spm/ROIvent/13417_latvent_dilated.nii.gz
21012
/home/grg/spm/ROIvent/21012_latvent_dilated.nii.gz
21051
/home/grg/spm/ROIvent/21051_latvent_dilated.nii.gz
21056
/home/grg/spm/ROIvent/21056_latvent_dilated.nii.gz
21084
/home/grg/spm/ROIvent/21084_latvent_dilated.nii.gz
44004
/home/grg/spm/ROIvent/44004_latvent_dilated.nii.gz
44043
/home/grg/spm/ROIvent/44043_latvent_dilated.nii.gz
44057
/home/grg/spm/ROIvent/44057_latvent_dilated.nii.gz
44147
/home/grg/spm/ROIvent/44147_latvent_dilated.nii.gz
44491
/home/grg/spm/ROIvent/44491_latvent_dilated.nii.gz
44632
/home/grg/spm/ROIvent/44632_latvent_dilated.nii.gz
55200
/home/grg/spm/ROIvent/55200_latvent_dilated.nii.gz
55483
/home/grg/spm/ROIvent/55483_latvent_dilated.nii.gz
55667
/home/grg/spm/ROIvent/55667_latvent_dilated.nii.gz
55708
/home/grg/spm/ROIvent/55708_latvent_dilated.nii.gz
55734
/home/grg/spm/ROIvent/55734_latvent_dilated.nii.gz
66017
/home/grg/spm/ROIvent/66017_latvent_dilated.nii.gz
66026
/home/grg/spm/ROIvent/66026_latvent_dilated.nii.gz
66039
/home/grg/spm/ROIvent/66039_latvent_dilated.nii.gz
66131
/home/grg/spm/ROIvent/66131_latvent_dilated.nii.gz
66162
/home/grg/spm/ROIvent/66162_latvent_dilated.nii.gz
66368
/home/grg/spm/ROIvent/66368_latvent_dilated.nii.gz
77027
/home/grg/spm/ROIvent/77027_latvent_dilated.nii.gz
77034
/home/grg/spm/ROIvent/77034_latvent_dilated.nii.gz
77040
/home/grg/spm/ROIvent/77040_latvent_dilated.nii.gz
77044
/home/grg/spm/ROIvent/77044_latvent_dilated.nii.gz
77056
/home/grg/spm/ROIvent/77056_latvent_dilated.nii.gz
77096
/home/grg/spm/ROIvent/77096_latvent_dilated.nii.gz
77117
/home/grg/spm/ROIvent/77117_latvent_dilated.nii.gz
77130
/home/grg/spm/ROIvent/77130_latvent_dilated.nii.gz
77140
/home/grg/spm/ROIvent/77140_latvent_dilated.nii.gz
77192
/home/grg/spm/ROIvent/77192_latvent_dilated.nii.gz
77217
/home/grg/spm/ROIvent/77217_latvent_dilated.nii.gz
77254
/home/grg/spm/ROIvent/77254_latvent_dilated.nii.gz
10065
/home/grg/spm/ROIvent/10065_latvent_dilated.nii.gz
10071
/home/grg/spm/ROIvent/10071_latvent_dilated.nii.gz
10096
/home/grg/spm/ROIvent/10096_latvent_dilated.nii.gz
10144
/home/grg/spm/ROIvent/10144_latvent_dilated.nii.gz
10180
/home/grg/spm/ROIvent/10180_latvent_dilated.nii.gz
10212
/home/grg/spm/ROIvent/10212_latvent_dilated.nii.gz
10298
/home/grg/spm/ROIvent/10298_latvent_dilated.nii.gz
10334
/home/grg/spm/ROIvent/10334_latvent_dilated.nii.gz
10367
/home/grg/spm/ROIvent/10367_latvent_dilated.nii.gz
10496
/home/grg/spm/ROIvent/10496_latvent_dilated.nii.gz
10515
/home/grg/spm/ROIvent/10515_latvent_dilated.nii.gz
10613
/home/grg/spm/ROIvent/10613_latvent_dilated.nii.gz
10701
/home/grg/spm/ROIvent/10701_latvent_dilated.nii.gz
11015
/home/grg/spm/ROIvent/11015_latvent_dilated.nii.gz
11042
/home/grg/spm/ROIvent/11042_latvent_dilated.nii.gz
11114
/home/grg/spm/ROIvent/11114_latvent_dilated.nii.gz
11213
/home/grg/spm/ROIvent/11213_latvent_dilated.nii.gz
11291
/home/grg/spm/ROIvent/11291_latvent_dilated.nii.gz
11540
/home/grg/spm/ROIvent/11540_latvent_dilated.nii.gz
11561
/home/grg/spm/ROIvent/11561_latvent_dilated.nii.gz
11592
/home/grg/spm/ROIvent/11592_latvent_dilated.nii.gz
11593
/home/grg/spm/ROIvent/11593_latvent_dilated.nii.gz
11646
/home/grg/spm/ROIvent/11646_latvent_dilated.nii.gz
11656
/home/grg/spm/ROIvent/11656_latvent_dilated.nii.gz
11687
/home/grg/spm/ROIvent/11687_latvent_dilated.nii.gz
11711
/home/grg/spm/ROIvent/11711_latvent_dilated.nii.gz
11796
/home/grg/spm/ROIvent/11796_latvent_dilated.nii.gz
11829
/home/grg/spm/ROIvent/11829_latvent_dilated.nii.gz
11874
/home/grg/spm/ROIvent/11874_latvent_dilated.nii.gz
11882
/home/grg/spm/ROIvent/11882_latvent_dilated.nii.gz
11939
/home/grg/spm/ROIvent/11939_latvent_dilated.nii.gz
12125
/home/grg/spm/ROIvent/12125_latvent_dilated.nii.gz
12133
/home/grg/spm/ROIvent/12133_latvent_dilated.nii.gz
12172
/home/grg/spm/ROIvent/12172_latvent_dilated.nii.gz
12271
/home/grg/spm/ROIvent/12271_latvent_dilated.nii.gz
12304
/home/grg/spm/ROIvent/12304_latvent_dilated.nii.gz
12308
/home/grg/spm/ROIvent/12308_latvent_dilated.nii.gz
12356
/home/grg/spm/ROIvent/12356_latvent_dilated.nii.gz
12391
/home/grg/spm/ROIvent/12391_latvent_dilated.nii.gz
12483
/home/grg/spm/ROIvent/12483_latvent_dilated.nii.gz
12502
/home/grg/spm/ROIvent/12502_latvent_dilated.nii.gz
12511
/home/grg/spm/ROIvent/12511_latvent_dilated.nii.gz
12582
/home/grg/spm/ROIvent/12582_latvent_dilated.nii.gz
12636
/home/grg/spm/ROIvent/12636_latvent_dilated.nii.gz
12711
/home/grg/spm/ROIvent/12711_latvent_dilated.nii.gz
12765
/home/grg/spm/ROIvent/12765_latvent_dilated.nii.gz
12785
/home/grg/spm/ROIvent/12785_latvent_dilated.nii.gz
12893
/home/grg/spm/ROIvent/12893_latvent_dilated.nii.gz
12963
/home/grg/spm/ROIvent/12963_latvent_dilated.nii.gz
12975
/home/grg/spm/ROIvent/12975_latvent_dilated.nii.gz
13083
/home/grg/spm/ROIvent/13083_latvent_dilated.nii.gz
13244
/home/grg/spm/ROIvent/13244_latvent_dilated.nii.gz
13306
/home/grg/spm/ROIvent/13306_latvent_dilated.nii.gz
13345
/home/grg/spm/ROIvent/13345_latvent_dilated.nii.gz
21039
/home/grg/spm/ROIvent/21039_latvent_dilated.nii.gz
21130
/home/grg/spm/ROIvent/21130_latvent_dilated.nii.gz
44229
/home/grg/spm/ROIvent/44229_latvent_dilated.nii.gz
44660
/home/grg/spm/ROIvent/44660_latvent_dilated.nii.gz
55388
/home/grg/spm/ROIvent/55388_latvent_dilated.nii.gz
55630
/home/grg/spm/ROIvent/55630_latvent_dilated.nii.gz
66085
/home/grg/spm/ROIvent/66085_latvent_dilated.nii.gz
66257
/home/grg/spm/ROIvent/66257_latvent_dilated.nii.gz
66309
/home/grg/spm/ROIvent/66309_latvent_dilated.nii.gz
77047
/home/grg/spm/ROIvent/77047_latvent_dilated.nii.gz
77179
/home/grg/spm/ROIvent/77179_latvent_dilated.nii.gz

In [ ]:

Checking the matching between ROI and data with an example


In [245]:
mdt1fp = '/home/grg/data/ALFA_DWI/77179/DWI/77179_MD_t1space.nii.gz'
sample_md = np.array(nib.load(mdt1fp).dataobj, copy=True)
perifp = '/home/grg/spm/ROIvent/77179_latvent_dilated.nii.gz'
sample_peri = np.array(nib.load(perifp).dataobj, copy=True)
print mdt1fp, perifp, sample_md.shape, sample_peri.shape
from nilearn import image
%matplotlib inline
sample_md[sample_peri<0.5] = 0
plot_stat_map(image.new_img_like(mdt1fp, sample_md), start =-30, end=10, step=2, row_l=6, title='Checking the matching between ROI and data with an example')


/home/grg/data/ALFA_DWI/77179/DWI/77179_MD_t1space.nii.gz /home/grg/spm/ROIvent/77179_latvent_dilated.nii.gz (174, 256, 256) (174, 256, 256)
Saving to... /tmp/tmp3QrlIa.png

Storing data in an Excel table then load it for analysis


In [246]:
df = pd.DataFrame(data, columns=['subject', 'group', 'age', 'agesq', 'gender', 'educyears', 'mdl', 'mdr', 'vl', 'vr'], index=subjects)
df.drop(10657, inplace=True) # ventricles failed
df.drop(10701, inplace=True) # ventricles failed
df.drop(21057, inplace=True) # ventricles failed

del df['subject']
df
df.to_excel('/tmp/roi_native.xls')

In [247]:
df = pd.read_excel('/tmp/roi_native.xls')
axes = pd.scatter_matrix(df, figsize=(30,30))
corr = df.corr().as_matrix()
for i, j in zip(*plt.np.triu_indices_from(axes, k=1)):
    axes[i, j].annotate("%.3f" %corr[i,j], (0.8, 0.8), xycoords='axes fraction', ha='center', va='center')

plt.show()


Doing it in MNI on normalized data


In [248]:
#md_mni = glob('/home/grg/data/ALFA_DWI/*/DWI/*MD_MNIspace.nii.gz')
groups_size = [102, 44, 143, 160, 65]
groups_names = ['Apoe2-3', 'Apoe2-4', 'Apoe3-3', 'Apoe3-4', 'Apoe4-4']

groups = []
start = 0
for size in groups_size:
    g = subjects[start:start + size]
    start = start + size
    groups.append(g)

data_mni = []
for s in subjects:
    try:
        print s
        perifp = '/tmp/perivent_MNIspace.nii.gz' #glob(osp.join(perid, '%s_latvent_dilated.nii.gz'%s))[0]
        print perifp
        mdmnifp = glob(osp.join(alfad, '%s*'%s, 'DWI', '%s*_MD_MNIspace.nii.gz'%s))[0]
        
        mdmni = np.array(nib.load(mdmnifp).dataobj)
        im_peri = nib.load(perifp)
        
        resample_im_peri = np.array(image.resample_to_img(im_peri, mdmnifp, interpolation='nearest').dataobj)
        
        mdl = np.mean(mdmni[np.abs(resample_im_peri-2)<0.5])
        mdr = np.mean(mdmni[np.abs(resample_im_peri-1)<0.5])
        
        age = ages[str(s)]
        group = [s in each for each in groups].index(True)
        ey = educyears[str(s)]
        jdgvol = jdg_vvol[s]
        gender = genders[str(s)]
        vl = vvol_l[s]# / tivs[str(s)]# +vvol_li[s]
        vr = vvol_r[s]# / tivs[str(s)]# + vvol_ri[s]
                
        row = [s, group, age, age*age, gender, ey, mdl, mdr, vl, vr]
        data_mni.append(row)
        
    except IndexError as e:
        print s, e


10070
/tmp/perivent_MNIspace.nii.gz
10102
/tmp/perivent_MNIspace.nii.gz
10108
/tmp/perivent_MNIspace.nii.gz
10235
/tmp/perivent_MNIspace.nii.gz
10365
/tmp/perivent_MNIspace.nii.gz
10419
/tmp/perivent_MNIspace.nii.gz
10463
/tmp/perivent_MNIspace.nii.gz
10530
/tmp/perivent_MNIspace.nii.gz
10551
/tmp/perivent_MNIspace.nii.gz
10563
/tmp/perivent_MNIspace.nii.gz
10576
/tmp/perivent_MNIspace.nii.gz
10630
/tmp/perivent_MNIspace.nii.gz
10668
/tmp/perivent_MNIspace.nii.gz
10692
/tmp/perivent_MNIspace.nii.gz
10693
/tmp/perivent_MNIspace.nii.gz
10703
/tmp/perivent_MNIspace.nii.gz
10725
/tmp/perivent_MNIspace.nii.gz
10737
/tmp/perivent_MNIspace.nii.gz
10756
/tmp/perivent_MNIspace.nii.gz
10809
/tmp/perivent_MNIspace.nii.gz
11045
/tmp/perivent_MNIspace.nii.gz
11047
/tmp/perivent_MNIspace.nii.gz
11048
/tmp/perivent_MNIspace.nii.gz
11133
/tmp/perivent_MNIspace.nii.gz
11180
/tmp/perivent_MNIspace.nii.gz
11225
/tmp/perivent_MNIspace.nii.gz
11262
/tmp/perivent_MNIspace.nii.gz
11305
/tmp/perivent_MNIspace.nii.gz
11351
/tmp/perivent_MNIspace.nii.gz
11360
/tmp/perivent_MNIspace.nii.gz
11387
/tmp/perivent_MNIspace.nii.gz
11407
/tmp/perivent_MNIspace.nii.gz
11414
/tmp/perivent_MNIspace.nii.gz
11416
/tmp/perivent_MNIspace.nii.gz
11550
/tmp/perivent_MNIspace.nii.gz
11610
/tmp/perivent_MNIspace.nii.gz
11614
/tmp/perivent_MNIspace.nii.gz
11638
/tmp/perivent_MNIspace.nii.gz
11658
/tmp/perivent_MNIspace.nii.gz
11691
/tmp/perivent_MNIspace.nii.gz
11721
/tmp/perivent_MNIspace.nii.gz
11737
/tmp/perivent_MNIspace.nii.gz
11768
/tmp/perivent_MNIspace.nii.gz
11798
/tmp/perivent_MNIspace.nii.gz
11803
/tmp/perivent_MNIspace.nii.gz
11858
/tmp/perivent_MNIspace.nii.gz
11902
/tmp/perivent_MNIspace.nii.gz
11941
/tmp/perivent_MNIspace.nii.gz
11975
/tmp/perivent_MNIspace.nii.gz
11979
/tmp/perivent_MNIspace.nii.gz
12032
/tmp/perivent_MNIspace.nii.gz
12067
/tmp/perivent_MNIspace.nii.gz
12079
/tmp/perivent_MNIspace.nii.gz
12121
/tmp/perivent_MNIspace.nii.gz
12140
/tmp/perivent_MNIspace.nii.gz
12174
/tmp/perivent_MNIspace.nii.gz
12244
/tmp/perivent_MNIspace.nii.gz
12252
/tmp/perivent_MNIspace.nii.gz
12323
/tmp/perivent_MNIspace.nii.gz
12324
/tmp/perivent_MNIspace.nii.gz
12331
/tmp/perivent_MNIspace.nii.gz
12399
/tmp/perivent_MNIspace.nii.gz
12425
/tmp/perivent_MNIspace.nii.gz
12445
/tmp/perivent_MNIspace.nii.gz
12479
/tmp/perivent_MNIspace.nii.gz
12484
/tmp/perivent_MNIspace.nii.gz
12493
/tmp/perivent_MNIspace.nii.gz
12516
/tmp/perivent_MNIspace.nii.gz
12637
/tmp/perivent_MNIspace.nii.gz
12659
/tmp/perivent_MNIspace.nii.gz
12730
/tmp/perivent_MNIspace.nii.gz
12783
/tmp/perivent_MNIspace.nii.gz
12787
/tmp/perivent_MNIspace.nii.gz
12841
/tmp/perivent_MNIspace.nii.gz
12920
/tmp/perivent_MNIspace.nii.gz
12970
/tmp/perivent_MNIspace.nii.gz
12976
/tmp/perivent_MNIspace.nii.gz
13008
/tmp/perivent_MNIspace.nii.gz
13035
/tmp/perivent_MNIspace.nii.gz
13075
/tmp/perivent_MNIspace.nii.gz
13090
/tmp/perivent_MNIspace.nii.gz
13118
/tmp/perivent_MNIspace.nii.gz
13138
/tmp/perivent_MNIspace.nii.gz
13235
/tmp/perivent_MNIspace.nii.gz
21092
/tmp/perivent_MNIspace.nii.gz
44046
/tmp/perivent_MNIspace.nii.gz
44205
/tmp/perivent_MNIspace.nii.gz
55166
/tmp/perivent_MNIspace.nii.gz
55529
/tmp/perivent_MNIspace.nii.gz
55538
/tmp/perivent_MNIspace.nii.gz
55854
/tmp/perivent_MNIspace.nii.gz
66089
/tmp/perivent_MNIspace.nii.gz
66125
/tmp/perivent_MNIspace.nii.gz
66159
/tmp/perivent_MNIspace.nii.gz
66239
/tmp/perivent_MNIspace.nii.gz
66240
/tmp/perivent_MNIspace.nii.gz
66270
/tmp/perivent_MNIspace.nii.gz
66312
/tmp/perivent_MNIspace.nii.gz
77068
/tmp/perivent_MNIspace.nii.gz
77093
/tmp/perivent_MNIspace.nii.gz
77094
/tmp/perivent_MNIspace.nii.gz
77195
/tmp/perivent_MNIspace.nii.gz
10015
/tmp/perivent_MNIspace.nii.gz
10041
/tmp/perivent_MNIspace.nii.gz
10090
/tmp/perivent_MNIspace.nii.gz
10150
/tmp/perivent_MNIspace.nii.gz
10282
/tmp/perivent_MNIspace.nii.gz
10486
/tmp/perivent_MNIspace.nii.gz
10518
/tmp/perivent_MNIspace.nii.gz
10536
/tmp/perivent_MNIspace.nii.gz
10645
/tmp/perivent_MNIspace.nii.gz
11038
/tmp/perivent_MNIspace.nii.gz
11144
/tmp/perivent_MNIspace.nii.gz
11191
/tmp/perivent_MNIspace.nii.gz
11195
/tmp/perivent_MNIspace.nii.gz
11252
/tmp/perivent_MNIspace.nii.gz
11436
/tmp/perivent_MNIspace.nii.gz
11597
/tmp/perivent_MNIspace.nii.gz
12015
/tmp/perivent_MNIspace.nii.gz
12122
/tmp/perivent_MNIspace.nii.gz
12245
/tmp/perivent_MNIspace.nii.gz
12417
/tmp/perivent_MNIspace.nii.gz
12704
/tmp/perivent_MNIspace.nii.gz
12772
/tmp/perivent_MNIspace.nii.gz
12930
/tmp/perivent_MNIspace.nii.gz
13054
/tmp/perivent_MNIspace.nii.gz
13070
/tmp/perivent_MNIspace.nii.gz
21002
/tmp/perivent_MNIspace.nii.gz
21011
/tmp/perivent_MNIspace.nii.gz
55351
/tmp/perivent_MNIspace.nii.gz
55353
/tmp/perivent_MNIspace.nii.gz
55355
/tmp/perivent_MNIspace.nii.gz
55488
/tmp/perivent_MNIspace.nii.gz
55539
/tmp/perivent_MNIspace.nii.gz
55636
/tmp/perivent_MNIspace.nii.gz
55793
/tmp/perivent_MNIspace.nii.gz
66020
/tmp/perivent_MNIspace.nii.gz
66094
/tmp/perivent_MNIspace.nii.gz
66164
/tmp/perivent_MNIspace.nii.gz
66341
/tmp/perivent_MNIspace.nii.gz
66492
/tmp/perivent_MNIspace.nii.gz
77109
/tmp/perivent_MNIspace.nii.gz
77152
/tmp/perivent_MNIspace.nii.gz
77191
/tmp/perivent_MNIspace.nii.gz
77224
/tmp/perivent_MNIspace.nii.gz
77241
/tmp/perivent_MNIspace.nii.gz
10013
/tmp/perivent_MNIspace.nii.gz
10023
/tmp/perivent_MNIspace.nii.gz
10024
/tmp/perivent_MNIspace.nii.gz
10028
/tmp/perivent_MNIspace.nii.gz
10032
/tmp/perivent_MNIspace.nii.gz
10036
/tmp/perivent_MNIspace.nii.gz
10038
/tmp/perivent_MNIspace.nii.gz
10040
/tmp/perivent_MNIspace.nii.gz
10042
/tmp/perivent_MNIspace.nii.gz
10049
/tmp/perivent_MNIspace.nii.gz
10052
/tmp/perivent_MNIspace.nii.gz
10053
/tmp/perivent_MNIspace.nii.gz
10056
/tmp/perivent_MNIspace.nii.gz
10081
/tmp/perivent_MNIspace.nii.gz
10117
/tmp/perivent_MNIspace.nii.gz
10118
/tmp/perivent_MNIspace.nii.gz
10151
/tmp/perivent_MNIspace.nii.gz
10156
/tmp/perivent_MNIspace.nii.gz
10158
/tmp/perivent_MNIspace.nii.gz
10166
/tmp/perivent_MNIspace.nii.gz
10170
/tmp/perivent_MNIspace.nii.gz
10178
/tmp/perivent_MNIspace.nii.gz
10182
/tmp/perivent_MNIspace.nii.gz
10199
/tmp/perivent_MNIspace.nii.gz
10200
/tmp/perivent_MNIspace.nii.gz
10213
/tmp/perivent_MNIspace.nii.gz
10217
/tmp/perivent_MNIspace.nii.gz
10239
/tmp/perivent_MNIspace.nii.gz
10242
/tmp/perivent_MNIspace.nii.gz
10245
/tmp/perivent_MNIspace.nii.gz
10248
/tmp/perivent_MNIspace.nii.gz
10251
/tmp/perivent_MNIspace.nii.gz
10253
/tmp/perivent_MNIspace.nii.gz
10263
/tmp/perivent_MNIspace.nii.gz
10265
/tmp/perivent_MNIspace.nii.gz
10308
/tmp/perivent_MNIspace.nii.gz
10313
/tmp/perivent_MNIspace.nii.gz
10322
/tmp/perivent_MNIspace.nii.gz
10325
/tmp/perivent_MNIspace.nii.gz
10326
/tmp/perivent_MNIspace.nii.gz
10329
/tmp/perivent_MNIspace.nii.gz
10330
/tmp/perivent_MNIspace.nii.gz
10354
/tmp/perivent_MNIspace.nii.gz
10370
/tmp/perivent_MNIspace.nii.gz
10385
/tmp/perivent_MNIspace.nii.gz
10393
/tmp/perivent_MNIspace.nii.gz
10417
/tmp/perivent_MNIspace.nii.gz
10426
/tmp/perivent_MNIspace.nii.gz
10528
/tmp/perivent_MNIspace.nii.gz
10577
/tmp/perivent_MNIspace.nii.gz
10678
/tmp/perivent_MNIspace.nii.gz
10682
/tmp/perivent_MNIspace.nii.gz
10697
/tmp/perivent_MNIspace.nii.gz
10724
/tmp/perivent_MNIspace.nii.gz
10821
/tmp/perivent_MNIspace.nii.gz
10841
/tmp/perivent_MNIspace.nii.gz
10850
/tmp/perivent_MNIspace.nii.gz
10855
/tmp/perivent_MNIspace.nii.gz
10858
/tmp/perivent_MNIspace.nii.gz
10894
/tmp/perivent_MNIspace.nii.gz
10900
/tmp/perivent_MNIspace.nii.gz
10942
/tmp/perivent_MNIspace.nii.gz
10946
/tmp/perivent_MNIspace.nii.gz
11030
/tmp/perivent_MNIspace.nii.gz
11063
/tmp/perivent_MNIspace.nii.gz
11136
/tmp/perivent_MNIspace.nii.gz
11137
/tmp/perivent_MNIspace.nii.gz
11139
/tmp/perivent_MNIspace.nii.gz
11152
/tmp/perivent_MNIspace.nii.gz
11184
/tmp/perivent_MNIspace.nii.gz
11257
/tmp/perivent_MNIspace.nii.gz
11264
/tmp/perivent_MNIspace.nii.gz
11426
/tmp/perivent_MNIspace.nii.gz
11478
/tmp/perivent_MNIspace.nii.gz
11590
/tmp/perivent_MNIspace.nii.gz
11620
/tmp/perivent_MNIspace.nii.gz
11679
/tmp/perivent_MNIspace.nii.gz
11686
/tmp/perivent_MNIspace.nii.gz
11830
/tmp/perivent_MNIspace.nii.gz
12138
/tmp/perivent_MNIspace.nii.gz
12239
/tmp/perivent_MNIspace.nii.gz
12279
/tmp/perivent_MNIspace.nii.gz
12327
/tmp/perivent_MNIspace.nii.gz
12624
/tmp/perivent_MNIspace.nii.gz
12699
/tmp/perivent_MNIspace.nii.gz
12767
/tmp/perivent_MNIspace.nii.gz
12861
/tmp/perivent_MNIspace.nii.gz
12904
/tmp/perivent_MNIspace.nii.gz
13059
/tmp/perivent_MNIspace.nii.gz
13061
/tmp/perivent_MNIspace.nii.gz
13144
/tmp/perivent_MNIspace.nii.gz
13169
/tmp/perivent_MNIspace.nii.gz
13188
/tmp/perivent_MNIspace.nii.gz
13214
/tmp/perivent_MNIspace.nii.gz
13215
/tmp/perivent_MNIspace.nii.gz
13217
/tmp/perivent_MNIspace.nii.gz
13238
/tmp/perivent_MNIspace.nii.gz
13242
/tmp/perivent_MNIspace.nii.gz
13312
/tmp/perivent_MNIspace.nii.gz
13367
/tmp/perivent_MNIspace.nii.gz
21042
/tmp/perivent_MNIspace.nii.gz
21057
/tmp/perivent_MNIspace.nii.gz
21073
/tmp/perivent_MNIspace.nii.gz
44068
/tmp/perivent_MNIspace.nii.gz
44091
/tmp/perivent_MNIspace.nii.gz
44094
/tmp/perivent_MNIspace.nii.gz
44119
/tmp/perivent_MNIspace.nii.gz
44141
/tmp/perivent_MNIspace.nii.gz
44151
/tmp/perivent_MNIspace.nii.gz
44723
/tmp/perivent_MNIspace.nii.gz
55057
/tmp/perivent_MNIspace.nii.gz
55152
/tmp/perivent_MNIspace.nii.gz
55216
/tmp/perivent_MNIspace.nii.gz
55297
/tmp/perivent_MNIspace.nii.gz
55323
/tmp/perivent_MNIspace.nii.gz
55370
/tmp/perivent_MNIspace.nii.gz
55469
/tmp/perivent_MNIspace.nii.gz
55778
/tmp/perivent_MNIspace.nii.gz
66019
/tmp/perivent_MNIspace.nii.gz
66030
/tmp/perivent_MNIspace.nii.gz
66042
/tmp/perivent_MNIspace.nii.gz
66048
/tmp/perivent_MNIspace.nii.gz
66050
/tmp/perivent_MNIspace.nii.gz
66128
/tmp/perivent_MNIspace.nii.gz
66133
/tmp/perivent_MNIspace.nii.gz
66141
/tmp/perivent_MNIspace.nii.gz
66169
/tmp/perivent_MNIspace.nii.gz
66183
/tmp/perivent_MNIspace.nii.gz
66264
/tmp/perivent_MNIspace.nii.gz
66267
/tmp/perivent_MNIspace.nii.gz
66268
/tmp/perivent_MNIspace.nii.gz
66293
/tmp/perivent_MNIspace.nii.gz
66335
/tmp/perivent_MNIspace.nii.gz
66361
/tmp/perivent_MNIspace.nii.gz
66498
/tmp/perivent_MNIspace.nii.gz
77024
/tmp/perivent_MNIspace.nii.gz
77037
/tmp/perivent_MNIspace.nii.gz
77076
/tmp/perivent_MNIspace.nii.gz
77151
/tmp/perivent_MNIspace.nii.gz
77175
/tmp/perivent_MNIspace.nii.gz
77188
/tmp/perivent_MNIspace.nii.gz
77252
/tmp/perivent_MNIspace.nii.gz
77263
/tmp/perivent_MNIspace.nii.gz
10016
/tmp/perivent_MNIspace.nii.gz
10025
/tmp/perivent_MNIspace.nii.gz
10026
/tmp/perivent_MNIspace.nii.gz
10029
/tmp/perivent_MNIspace.nii.gz
10034
/tmp/perivent_MNIspace.nii.gz
10035
/tmp/perivent_MNIspace.nii.gz
10051
/tmp/perivent_MNIspace.nii.gz
10099
/tmp/perivent_MNIspace.nii.gz
10106
/tmp/perivent_MNIspace.nii.gz
10134
/tmp/perivent_MNIspace.nii.gz
10160
/tmp/perivent_MNIspace.nii.gz
10162
/tmp/perivent_MNIspace.nii.gz
10225
/tmp/perivent_MNIspace.nii.gz
10226
/tmp/perivent_MNIspace.nii.gz
10259
/tmp/perivent_MNIspace.nii.gz
10317
/tmp/perivent_MNIspace.nii.gz
10319
/tmp/perivent_MNIspace.nii.gz
10324
/tmp/perivent_MNIspace.nii.gz
10333
/tmp/perivent_MNIspace.nii.gz
10338
/tmp/perivent_MNIspace.nii.gz
10346
/tmp/perivent_MNIspace.nii.gz
10361
/tmp/perivent_MNIspace.nii.gz
10362
/tmp/perivent_MNIspace.nii.gz
10396
/tmp/perivent_MNIspace.nii.gz
10397
/tmp/perivent_MNIspace.nii.gz
10416
/tmp/perivent_MNIspace.nii.gz
10418
/tmp/perivent_MNIspace.nii.gz
10433
/tmp/perivent_MNIspace.nii.gz
10436
/tmp/perivent_MNIspace.nii.gz
10450
/tmp/perivent_MNIspace.nii.gz
10453
/tmp/perivent_MNIspace.nii.gz
10461
/tmp/perivent_MNIspace.nii.gz
10482
/tmp/perivent_MNIspace.nii.gz
10493
/tmp/perivent_MNIspace.nii.gz
10504
/tmp/perivent_MNIspace.nii.gz
10522
/tmp/perivent_MNIspace.nii.gz
10538
/tmp/perivent_MNIspace.nii.gz
10541
/tmp/perivent_MNIspace.nii.gz
10550
/tmp/perivent_MNIspace.nii.gz
10593
/tmp/perivent_MNIspace.nii.gz
10634
/tmp/perivent_MNIspace.nii.gz
10657
/tmp/perivent_MNIspace.nii.gz
10696
/tmp/perivent_MNIspace.nii.gz
10735
/tmp/perivent_MNIspace.nii.gz
10741
/tmp/perivent_MNIspace.nii.gz
10744
/tmp/perivent_MNIspace.nii.gz
10750
/tmp/perivent_MNIspace.nii.gz
10778
/tmp/perivent_MNIspace.nii.gz
10787
/tmp/perivent_MNIspace.nii.gz
10794
/tmp/perivent_MNIspace.nii.gz
10811
/tmp/perivent_MNIspace.nii.gz
10822
/tmp/perivent_MNIspace.nii.gz
10846
/tmp/perivent_MNIspace.nii.gz
10870
/tmp/perivent_MNIspace.nii.gz
10881
/tmp/perivent_MNIspace.nii.gz
10901
/tmp/perivent_MNIspace.nii.gz
10944
/tmp/perivent_MNIspace.nii.gz
10972
/tmp/perivent_MNIspace.nii.gz
10988
/tmp/perivent_MNIspace.nii.gz
11007
/tmp/perivent_MNIspace.nii.gz
11012
/tmp/perivent_MNIspace.nii.gz
11019
/tmp/perivent_MNIspace.nii.gz
11054
/tmp/perivent_MNIspace.nii.gz
11092
/tmp/perivent_MNIspace.nii.gz
11127
/tmp/perivent_MNIspace.nii.gz
11156
/tmp/perivent_MNIspace.nii.gz
11196
/tmp/perivent_MNIspace.nii.gz
11201
/tmp/perivent_MNIspace.nii.gz
11219
/tmp/perivent_MNIspace.nii.gz
11222
/tmp/perivent_MNIspace.nii.gz
11245
/tmp/perivent_MNIspace.nii.gz
11247
/tmp/perivent_MNIspace.nii.gz
11254
/tmp/perivent_MNIspace.nii.gz
11292
/tmp/perivent_MNIspace.nii.gz
11323
/tmp/perivent_MNIspace.nii.gz
11327
/tmp/perivent_MNIspace.nii.gz
11355
/tmp/perivent_MNIspace.nii.gz
11383
/tmp/perivent_MNIspace.nii.gz
11415
/tmp/perivent_MNIspace.nii.gz
11458
/tmp/perivent_MNIspace.nii.gz
11461
/tmp/perivent_MNIspace.nii.gz
11474
/tmp/perivent_MNIspace.nii.gz
11481
/tmp/perivent_MNIspace.nii.gz
11514
/tmp/perivent_MNIspace.nii.gz
11552
/tmp/perivent_MNIspace.nii.gz
11583
/tmp/perivent_MNIspace.nii.gz
11630
/tmp/perivent_MNIspace.nii.gz
11641
/tmp/perivent_MNIspace.nii.gz
11747
/tmp/perivent_MNIspace.nii.gz
11778
/tmp/perivent_MNIspace.nii.gz
11850
/tmp/perivent_MNIspace.nii.gz
11872
/tmp/perivent_MNIspace.nii.gz
11937
/tmp/perivent_MNIspace.nii.gz
11943
/tmp/perivent_MNIspace.nii.gz
12056
/tmp/perivent_MNIspace.nii.gz
12186
/tmp/perivent_MNIspace.nii.gz
12269
/tmp/perivent_MNIspace.nii.gz
12296
/tmp/perivent_MNIspace.nii.gz
12379
/tmp/perivent_MNIspace.nii.gz
12409
/tmp/perivent_MNIspace.nii.gz
12548
/tmp/perivent_MNIspace.nii.gz
12715
/tmp/perivent_MNIspace.nii.gz
12724
/tmp/perivent_MNIspace.nii.gz
12771
/tmp/perivent_MNIspace.nii.gz
12778
/tmp/perivent_MNIspace.nii.gz
12810
/tmp/perivent_MNIspace.nii.gz
12812
/tmp/perivent_MNIspace.nii.gz
12823
/tmp/perivent_MNIspace.nii.gz
12858
/tmp/perivent_MNIspace.nii.gz
12874
/tmp/perivent_MNIspace.nii.gz
12878
/tmp/perivent_MNIspace.nii.gz
12941
/tmp/perivent_MNIspace.nii.gz
12947
/tmp/perivent_MNIspace.nii.gz
12995
/tmp/perivent_MNIspace.nii.gz
13019
/tmp/perivent_MNIspace.nii.gz
13043
/tmp/perivent_MNIspace.nii.gz
13049
/tmp/perivent_MNIspace.nii.gz
13063
/tmp/perivent_MNIspace.nii.gz
13105
/tmp/perivent_MNIspace.nii.gz
13127
/tmp/perivent_MNIspace.nii.gz
13151
/tmp/perivent_MNIspace.nii.gz
13236
/tmp/perivent_MNIspace.nii.gz
13268
/tmp/perivent_MNIspace.nii.gz
13293
/tmp/perivent_MNIspace.nii.gz
13309
/tmp/perivent_MNIspace.nii.gz
13322
/tmp/perivent_MNIspace.nii.gz
13417
/tmp/perivent_MNIspace.nii.gz
21012
/tmp/perivent_MNIspace.nii.gz
21051
/tmp/perivent_MNIspace.nii.gz
21056
/tmp/perivent_MNIspace.nii.gz
21084
/tmp/perivent_MNIspace.nii.gz
44004
/tmp/perivent_MNIspace.nii.gz
44043
/tmp/perivent_MNIspace.nii.gz
44057
/tmp/perivent_MNIspace.nii.gz
44147
/tmp/perivent_MNIspace.nii.gz
44491
/tmp/perivent_MNIspace.nii.gz
44632
/tmp/perivent_MNIspace.nii.gz
55200
/tmp/perivent_MNIspace.nii.gz
55483
/tmp/perivent_MNIspace.nii.gz
55667
/tmp/perivent_MNIspace.nii.gz
55708
/tmp/perivent_MNIspace.nii.gz
55734
/tmp/perivent_MNIspace.nii.gz
66017
/tmp/perivent_MNIspace.nii.gz
66026
/tmp/perivent_MNIspace.nii.gz
66039
/tmp/perivent_MNIspace.nii.gz
66131
/tmp/perivent_MNIspace.nii.gz
66162
/tmp/perivent_MNIspace.nii.gz
66368
/tmp/perivent_MNIspace.nii.gz
77027
/tmp/perivent_MNIspace.nii.gz
77034
/tmp/perivent_MNIspace.nii.gz
77040
/tmp/perivent_MNIspace.nii.gz
77044
/tmp/perivent_MNIspace.nii.gz
77056
/tmp/perivent_MNIspace.nii.gz
77096
/tmp/perivent_MNIspace.nii.gz
77117
/tmp/perivent_MNIspace.nii.gz
77130
/tmp/perivent_MNIspace.nii.gz
77140
/tmp/perivent_MNIspace.nii.gz
77192
/tmp/perivent_MNIspace.nii.gz
77217
/tmp/perivent_MNIspace.nii.gz
77254
/tmp/perivent_MNIspace.nii.gz
10065
/tmp/perivent_MNIspace.nii.gz
10071
/tmp/perivent_MNIspace.nii.gz
10096
/tmp/perivent_MNIspace.nii.gz
10144
/tmp/perivent_MNIspace.nii.gz
10180
/tmp/perivent_MNIspace.nii.gz
10212
/tmp/perivent_MNIspace.nii.gz
10298
/tmp/perivent_MNIspace.nii.gz
10334
/tmp/perivent_MNIspace.nii.gz
10367
/tmp/perivent_MNIspace.nii.gz
10496
/tmp/perivent_MNIspace.nii.gz
10515
/tmp/perivent_MNIspace.nii.gz
10613
/tmp/perivent_MNIspace.nii.gz
10701
/tmp/perivent_MNIspace.nii.gz
11015
/tmp/perivent_MNIspace.nii.gz
11042
/tmp/perivent_MNIspace.nii.gz
11114
/tmp/perivent_MNIspace.nii.gz
11213
/tmp/perivent_MNIspace.nii.gz
11291
/tmp/perivent_MNIspace.nii.gz
11540
/tmp/perivent_MNIspace.nii.gz
11561
/tmp/perivent_MNIspace.nii.gz
11592
/tmp/perivent_MNIspace.nii.gz
11593
/tmp/perivent_MNIspace.nii.gz
11646
/tmp/perivent_MNIspace.nii.gz
11656
/tmp/perivent_MNIspace.nii.gz
11687
/tmp/perivent_MNIspace.nii.gz
11711
/tmp/perivent_MNIspace.nii.gz
11796
/tmp/perivent_MNIspace.nii.gz
11829
/tmp/perivent_MNIspace.nii.gz
11874
/tmp/perivent_MNIspace.nii.gz
11882
/tmp/perivent_MNIspace.nii.gz
11939
/tmp/perivent_MNIspace.nii.gz
12125
/tmp/perivent_MNIspace.nii.gz
12133
/tmp/perivent_MNIspace.nii.gz
12172
/tmp/perivent_MNIspace.nii.gz
12271
/tmp/perivent_MNIspace.nii.gz
12304
/tmp/perivent_MNIspace.nii.gz
12308
/tmp/perivent_MNIspace.nii.gz
12356
/tmp/perivent_MNIspace.nii.gz
12391
/tmp/perivent_MNIspace.nii.gz
12483
/tmp/perivent_MNIspace.nii.gz
12502
/tmp/perivent_MNIspace.nii.gz
12511
/tmp/perivent_MNIspace.nii.gz
12582
/tmp/perivent_MNIspace.nii.gz
12636
/tmp/perivent_MNIspace.nii.gz
12711
/tmp/perivent_MNIspace.nii.gz
12765
/tmp/perivent_MNIspace.nii.gz
12785
/tmp/perivent_MNIspace.nii.gz
12893
/tmp/perivent_MNIspace.nii.gz
12963
/tmp/perivent_MNIspace.nii.gz
12975
/tmp/perivent_MNIspace.nii.gz
13083
/tmp/perivent_MNIspace.nii.gz
13244
/tmp/perivent_MNIspace.nii.gz
13306
/tmp/perivent_MNIspace.nii.gz
13345
/tmp/perivent_MNIspace.nii.gz
21039
/tmp/perivent_MNIspace.nii.gz
21130
/tmp/perivent_MNIspace.nii.gz
44229
/tmp/perivent_MNIspace.nii.gz
44660
/tmp/perivent_MNIspace.nii.gz
55388
/tmp/perivent_MNIspace.nii.gz
55630
/tmp/perivent_MNIspace.nii.gz
66085
/tmp/perivent_MNIspace.nii.gz
66257
/tmp/perivent_MNIspace.nii.gz
66309
/tmp/perivent_MNIspace.nii.gz
77047
/tmp/perivent_MNIspace.nii.gz
77179
/tmp/perivent_MNIspace.nii.gz

In [249]:
sample_md = np.array(nib.load(mdmnifp).dataobj)
sample_peri = np.array(nib.load('/tmp/perivent_MNIspace.nii.gz').dataobj)
resample_peri = image.resample_to_img('/tmp/perivent_MNIspace.nii.gz', mdmnifp, interpolation='nearest').dataobj
#resample_peri.to_filename('/tmp/peri_resample.nii.gz')
print mdmnifp, perifp, sample_md.shape, resample_peri.shape
from nilearn import image
%matplotlib inline
sample_md[resample_peri<1] = 0
plot_stat_map(image.new_img_like(mdmnifp, sample_md), start =-30, end=10, step=2, row_l=6, title='Checking the matching between ROI and data with an example (MNI space)')


/home/grg/data/ALFA_DWI/77179/DWI/77179_MD_MNIspace.nii.gz /tmp/perivent_MNIspace.nii.gz (91, 109, 91) (91, 109, 91)
Saving to... /tmp/tmphFoh77.png

In [250]:
df_mni = pd.DataFrame(data_mni, columns=['subject', 'group', 'age', 'agesq', 'gender', 'educyears', 'mdl', 'mdr', 'vl', 'vr'], index=subjects)
df_mni.drop(10657, inplace=True) # ventricles failed
df_mni.drop(10701, inplace=True) # ventricles failed
df_mni.drop(21057, inplace=True) # ventricles failed

del df_mni['subject']
df_mni.to_excel('/tmp/roi_mni.xls')

In [251]:
df_mni = pd.read_excel('/tmp/roi_mni.xls')
axes = pd.scatter_matrix(df_mni, figsize=(30,30))
corr = df_mni.corr().as_matrix()
for i, j in zip(*plt.np.triu_indices_from(axes, k=1)):
    axes[i, j].annotate("%.3f" %corr[i,j], (0.8, 0.8), xycoords='axes fraction', ha='center', va='center')

plt.show()


Doing it on ventricular segmentation maps registered to DWI space


In [252]:
groups_size = [102, 44, 143, 160, 65]
groups_names = ['Apoe2-3', 'Apoe2-4', 'Apoe3-3', 'Apoe3-4', 'Apoe4-4']

groups = []
start = 0
for size in groups_size:
    g = subjects[start:start + size]
    start = start + size
    groups.append(g)

data_dwispace = []
for s in subjects:
    try:
        print s
        perifp = glob(osp.join(perid, '%s_latvent_dilated_DWIspace.nii.gz'%s))[0]
        print perifp
        #jacofp = glob(osp.join(jacod, 's6j_t1_%s.nii'%s))[0]
        mdfp = [e for e in glob(osp.join(alfad, '%s*'%s, 'DWI', '%s*_MD.nii*'%s)) if '.minf' not in e][0]
        #mdt1fp = glob(osp.join(alfad, '%s*'%s, 'DWI', '%s*_MD_t1space.nii.gz'%s))[0]
        
        md = np.array(nib.load(mdfp).dataobj)
        peri = np.array(nib.load(perifp).dataobj)
        mdl = np.mean(md[np.abs(peri-1)<0.5])
        mdr = np.mean(md[np.abs(peri-2)<0.5])
        
        
        age = ages[str(s)]
        group = [s in each for each in groups].index(True)
        ey = educyears[str(s)]
        jdgvol = jdg_vvol[s]
        gender = genders[str(s)]
        vl = vvol_l[s]# / tivs[str(s)]# +vvol_li[s]
        vr = vvol_r[s]# / tivs[str(s)]# + vvol_ri[s]
                
        row = [s, group, age, age*age, gender, ey, mdl, mdr, vl, vr]
        data_dwispace.append(row)
        
    except IndexError as e:
        print s, e


10070
/home/grg/spm/ROIvent/10070_latvent_dilated_DWIspace.nii.gz
10102
/home/grg/spm/ROIvent/10102_latvent_dilated_DWIspace.nii.gz
10108
/home/grg/spm/ROIvent/10108_latvent_dilated_DWIspace.nii.gz
10235
/home/grg/spm/ROIvent/10235_latvent_dilated_DWIspace.nii.gz
10365
/home/grg/spm/ROIvent/10365_latvent_dilated_DWIspace.nii.gz
10419
/home/grg/spm/ROIvent/10419_latvent_dilated_DWIspace.nii.gz
10463
/home/grg/spm/ROIvent/10463_latvent_dilated_DWIspace.nii.gz
10530
/home/grg/spm/ROIvent/10530_latvent_dilated_DWIspace.nii.gz
10551
/home/grg/spm/ROIvent/10551_latvent_dilated_DWIspace.nii.gz
10563
/home/grg/spm/ROIvent/10563_latvent_dilated_DWIspace.nii.gz
10576
/home/grg/spm/ROIvent/10576_latvent_dilated_DWIspace.nii.gz
10630
/home/grg/spm/ROIvent/10630_latvent_dilated_DWIspace.nii.gz
10668
/home/grg/spm/ROIvent/10668_latvent_dilated_DWIspace.nii.gz
10692
/home/grg/spm/ROIvent/10692_latvent_dilated_DWIspace.nii.gz
10693
/home/grg/spm/ROIvent/10693_latvent_dilated_DWIspace.nii.gz
10703
/home/grg/spm/ROIvent/10703_latvent_dilated_DWIspace.nii.gz
10725
/home/grg/spm/ROIvent/10725_latvent_dilated_DWIspace.nii.gz
10737
/home/grg/spm/ROIvent/10737_latvent_dilated_DWIspace.nii.gz
10756
/home/grg/spm/ROIvent/10756_latvent_dilated_DWIspace.nii.gz
10809
/home/grg/spm/ROIvent/10809_latvent_dilated_DWIspace.nii.gz
11045
/home/grg/spm/ROIvent/11045_latvent_dilated_DWIspace.nii.gz
11047
/home/grg/spm/ROIvent/11047_latvent_dilated_DWIspace.nii.gz
11048
/home/grg/spm/ROIvent/11048_latvent_dilated_DWIspace.nii.gz
11133
/home/grg/spm/ROIvent/11133_latvent_dilated_DWIspace.nii.gz
11180
/home/grg/spm/ROIvent/11180_latvent_dilated_DWIspace.nii.gz
11225
/home/grg/spm/ROIvent/11225_latvent_dilated_DWIspace.nii.gz
11262
/home/grg/spm/ROIvent/11262_latvent_dilated_DWIspace.nii.gz
11305
/home/grg/spm/ROIvent/11305_latvent_dilated_DWIspace.nii.gz
11351
/home/grg/spm/ROIvent/11351_latvent_dilated_DWIspace.nii.gz
11360
/home/grg/spm/ROIvent/11360_latvent_dilated_DWIspace.nii.gz
11387
/home/grg/spm/ROIvent/11387_latvent_dilated_DWIspace.nii.gz
11407
/home/grg/spm/ROIvent/11407_latvent_dilated_DWIspace.nii.gz
11414
/home/grg/spm/ROIvent/11414_latvent_dilated_DWIspace.nii.gz
11416
/home/grg/spm/ROIvent/11416_latvent_dilated_DWIspace.nii.gz
11550
/home/grg/spm/ROIvent/11550_latvent_dilated_DWIspace.nii.gz
11610
/home/grg/spm/ROIvent/11610_latvent_dilated_DWIspace.nii.gz
11614
/home/grg/spm/ROIvent/11614_latvent_dilated_DWIspace.nii.gz
11638
/home/grg/spm/ROIvent/11638_latvent_dilated_DWIspace.nii.gz
11658
/home/grg/spm/ROIvent/11658_latvent_dilated_DWIspace.nii.gz
11691
/home/grg/spm/ROIvent/11691_latvent_dilated_DWIspace.nii.gz
11721
/home/grg/spm/ROIvent/11721_latvent_dilated_DWIspace.nii.gz
11737
/home/grg/spm/ROIvent/11737_latvent_dilated_DWIspace.nii.gz
11768
/home/grg/spm/ROIvent/11768_latvent_dilated_DWIspace.nii.gz
11798
/home/grg/spm/ROIvent/11798_latvent_dilated_DWIspace.nii.gz
11803
/home/grg/spm/ROIvent/11803_latvent_dilated_DWIspace.nii.gz
11858
/home/grg/spm/ROIvent/11858_latvent_dilated_DWIspace.nii.gz
11902
/home/grg/spm/ROIvent/11902_latvent_dilated_DWIspace.nii.gz
11941
/home/grg/spm/ROIvent/11941_latvent_dilated_DWIspace.nii.gz
11975
/home/grg/spm/ROIvent/11975_latvent_dilated_DWIspace.nii.gz
11979
/home/grg/spm/ROIvent/11979_latvent_dilated_DWIspace.nii.gz
12032
/home/grg/spm/ROIvent/12032_latvent_dilated_DWIspace.nii.gz
12067
/home/grg/spm/ROIvent/12067_latvent_dilated_DWIspace.nii.gz
12079
/home/grg/spm/ROIvent/12079_latvent_dilated_DWIspace.nii.gz
12121
/home/grg/spm/ROIvent/12121_latvent_dilated_DWIspace.nii.gz
12140
/home/grg/spm/ROIvent/12140_latvent_dilated_DWIspace.nii.gz
12174
/home/grg/spm/ROIvent/12174_latvent_dilated_DWIspace.nii.gz
12244
/home/grg/spm/ROIvent/12244_latvent_dilated_DWIspace.nii.gz
12252
/home/grg/spm/ROIvent/12252_latvent_dilated_DWIspace.nii.gz
12323
/home/grg/spm/ROIvent/12323_latvent_dilated_DWIspace.nii.gz
12324
/home/grg/spm/ROIvent/12324_latvent_dilated_DWIspace.nii.gz
12331
/home/grg/spm/ROIvent/12331_latvent_dilated_DWIspace.nii.gz
12399
/home/grg/spm/ROIvent/12399_latvent_dilated_DWIspace.nii.gz
12425
/home/grg/spm/ROIvent/12425_latvent_dilated_DWIspace.nii.gz
12445
/home/grg/spm/ROIvent/12445_latvent_dilated_DWIspace.nii.gz
12479
/home/grg/spm/ROIvent/12479_latvent_dilated_DWIspace.nii.gz
12484
/home/grg/spm/ROIvent/12484_latvent_dilated_DWIspace.nii.gz
12493
/home/grg/spm/ROIvent/12493_latvent_dilated_DWIspace.nii.gz
12516
/home/grg/spm/ROIvent/12516_latvent_dilated_DWIspace.nii.gz
12637
/home/grg/spm/ROIvent/12637_latvent_dilated_DWIspace.nii.gz
12659
/home/grg/spm/ROIvent/12659_latvent_dilated_DWIspace.nii.gz
12730
/home/grg/spm/ROIvent/12730_latvent_dilated_DWIspace.nii.gz
12783
/home/grg/spm/ROIvent/12783_latvent_dilated_DWIspace.nii.gz
12787
/home/grg/spm/ROIvent/12787_latvent_dilated_DWIspace.nii.gz
12841
/home/grg/spm/ROIvent/12841_latvent_dilated_DWIspace.nii.gz
12920
/home/grg/spm/ROIvent/12920_latvent_dilated_DWIspace.nii.gz
12970
/home/grg/spm/ROIvent/12970_latvent_dilated_DWIspace.nii.gz
12976
/home/grg/spm/ROIvent/12976_latvent_dilated_DWIspace.nii.gz
13008
/home/grg/spm/ROIvent/13008_latvent_dilated_DWIspace.nii.gz
13035
/home/grg/spm/ROIvent/13035_latvent_dilated_DWIspace.nii.gz
13075
/home/grg/spm/ROIvent/13075_latvent_dilated_DWIspace.nii.gz
13090
/home/grg/spm/ROIvent/13090_latvent_dilated_DWIspace.nii.gz
13118
/home/grg/spm/ROIvent/13118_latvent_dilated_DWIspace.nii.gz
13138
/home/grg/spm/ROIvent/13138_latvent_dilated_DWIspace.nii.gz
13235
/home/grg/spm/ROIvent/13235_latvent_dilated_DWIspace.nii.gz
21092
/home/grg/spm/ROIvent/21092_latvent_dilated_DWIspace.nii.gz
44046
/home/grg/spm/ROIvent/44046_latvent_dilated_DWIspace.nii.gz
44205
/home/grg/spm/ROIvent/44205_latvent_dilated_DWIspace.nii.gz
55166
/home/grg/spm/ROIvent/55166_latvent_dilated_DWIspace.nii.gz
55529
/home/grg/spm/ROIvent/55529_latvent_dilated_DWIspace.nii.gz
55538
/home/grg/spm/ROIvent/55538_latvent_dilated_DWIspace.nii.gz
55854
/home/grg/spm/ROIvent/55854_latvent_dilated_DWIspace.nii.gz
66089
/home/grg/spm/ROIvent/66089_latvent_dilated_DWIspace.nii.gz
66125
/home/grg/spm/ROIvent/66125_latvent_dilated_DWIspace.nii.gz
66159
/home/grg/spm/ROIvent/66159_latvent_dilated_DWIspace.nii.gz
66239
/home/grg/spm/ROIvent/66239_latvent_dilated_DWIspace.nii.gz
66240
/home/grg/spm/ROIvent/66240_latvent_dilated_DWIspace.nii.gz
66270
/home/grg/spm/ROIvent/66270_latvent_dilated_DWIspace.nii.gz
66312
/home/grg/spm/ROIvent/66312_latvent_dilated_DWIspace.nii.gz
77068
/home/grg/spm/ROIvent/77068_latvent_dilated_DWIspace.nii.gz
77093
/home/grg/spm/ROIvent/77093_latvent_dilated_DWIspace.nii.gz
77094
/home/grg/spm/ROIvent/77094_latvent_dilated_DWIspace.nii.gz
77195
/home/grg/spm/ROIvent/77195_latvent_dilated_DWIspace.nii.gz
10015
/home/grg/spm/ROIvent/10015_latvent_dilated_DWIspace.nii.gz
10041
/home/grg/spm/ROIvent/10041_latvent_dilated_DWIspace.nii.gz
10090
/home/grg/spm/ROIvent/10090_latvent_dilated_DWIspace.nii.gz
10150
/home/grg/spm/ROIvent/10150_latvent_dilated_DWIspace.nii.gz
10282
/home/grg/spm/ROIvent/10282_latvent_dilated_DWIspace.nii.gz
10486
/home/grg/spm/ROIvent/10486_latvent_dilated_DWIspace.nii.gz
10518
/home/grg/spm/ROIvent/10518_latvent_dilated_DWIspace.nii.gz
10536
/home/grg/spm/ROIvent/10536_latvent_dilated_DWIspace.nii.gz
10645
/home/grg/spm/ROIvent/10645_latvent_dilated_DWIspace.nii.gz
11038
/home/grg/spm/ROIvent/11038_latvent_dilated_DWIspace.nii.gz
11144
/home/grg/spm/ROIvent/11144_latvent_dilated_DWIspace.nii.gz
11191
/home/grg/spm/ROIvent/11191_latvent_dilated_DWIspace.nii.gz
11195
/home/grg/spm/ROIvent/11195_latvent_dilated_DWIspace.nii.gz
11252
/home/grg/spm/ROIvent/11252_latvent_dilated_DWIspace.nii.gz
11436
/home/grg/spm/ROIvent/11436_latvent_dilated_DWIspace.nii.gz
11597
/home/grg/spm/ROIvent/11597_latvent_dilated_DWIspace.nii.gz
12015
/home/grg/spm/ROIvent/12015_latvent_dilated_DWIspace.nii.gz
12122
/home/grg/spm/ROIvent/12122_latvent_dilated_DWIspace.nii.gz
12245
/home/grg/spm/ROIvent/12245_latvent_dilated_DWIspace.nii.gz
12417
/home/grg/spm/ROIvent/12417_latvent_dilated_DWIspace.nii.gz
12704
/home/grg/spm/ROIvent/12704_latvent_dilated_DWIspace.nii.gz
12772
/home/grg/spm/ROIvent/12772_latvent_dilated_DWIspace.nii.gz
12930
/home/grg/spm/ROIvent/12930_latvent_dilated_DWIspace.nii.gz
13054
/home/grg/spm/ROIvent/13054_latvent_dilated_DWIspace.nii.gz
13070
/home/grg/spm/ROIvent/13070_latvent_dilated_DWIspace.nii.gz
21002
/home/grg/spm/ROIvent/21002_latvent_dilated_DWIspace.nii.gz
21011
/home/grg/spm/ROIvent/21011_latvent_dilated_DWIspace.nii.gz
55351
/home/grg/spm/ROIvent/55351_latvent_dilated_DWIspace.nii.gz
55353
/home/grg/spm/ROIvent/55353_latvent_dilated_DWIspace.nii.gz
55355
/home/grg/spm/ROIvent/55355_latvent_dilated_DWIspace.nii.gz
55488
/home/grg/spm/ROIvent/55488_latvent_dilated_DWIspace.nii.gz
55539
/home/grg/spm/ROIvent/55539_latvent_dilated_DWIspace.nii.gz
55636
/home/grg/spm/ROIvent/55636_latvent_dilated_DWIspace.nii.gz
55793
/home/grg/spm/ROIvent/55793_latvent_dilated_DWIspace.nii.gz
66020
/home/grg/spm/ROIvent/66020_latvent_dilated_DWIspace.nii.gz
66094
/home/grg/spm/ROIvent/66094_latvent_dilated_DWIspace.nii.gz
66164
/home/grg/spm/ROIvent/66164_latvent_dilated_DWIspace.nii.gz
66341
/home/grg/spm/ROIvent/66341_latvent_dilated_DWIspace.nii.gz
66492
/home/grg/spm/ROIvent/66492_latvent_dilated_DWIspace.nii.gz
77109
/home/grg/spm/ROIvent/77109_latvent_dilated_DWIspace.nii.gz
77152
/home/grg/spm/ROIvent/77152_latvent_dilated_DWIspace.nii.gz
77191
/home/grg/spm/ROIvent/77191_latvent_dilated_DWIspace.nii.gz
77224
/home/grg/spm/ROIvent/77224_latvent_dilated_DWIspace.nii.gz
77241
/home/grg/spm/ROIvent/77241_latvent_dilated_DWIspace.nii.gz
10013
/home/grg/spm/ROIvent/10013_latvent_dilated_DWIspace.nii.gz
10023
/home/grg/spm/ROIvent/10023_latvent_dilated_DWIspace.nii.gz
10024
/home/grg/spm/ROIvent/10024_latvent_dilated_DWIspace.nii.gz
10028
/home/grg/spm/ROIvent/10028_latvent_dilated_DWIspace.nii.gz
10032
/home/grg/spm/ROIvent/10032_latvent_dilated_DWIspace.nii.gz
10036
/home/grg/spm/ROIvent/10036_latvent_dilated_DWIspace.nii.gz
10038
/home/grg/spm/ROIvent/10038_latvent_dilated_DWIspace.nii.gz
10040
/home/grg/spm/ROIvent/10040_latvent_dilated_DWIspace.nii.gz
10042
/home/grg/spm/ROIvent/10042_latvent_dilated_DWIspace.nii.gz
10049
/home/grg/spm/ROIvent/10049_latvent_dilated_DWIspace.nii.gz
10052
/home/grg/spm/ROIvent/10052_latvent_dilated_DWIspace.nii.gz
10053
/home/grg/spm/ROIvent/10053_latvent_dilated_DWIspace.nii.gz
10056
/home/grg/spm/ROIvent/10056_latvent_dilated_DWIspace.nii.gz
10081
/home/grg/spm/ROIvent/10081_latvent_dilated_DWIspace.nii.gz
10117
/home/grg/spm/ROIvent/10117_latvent_dilated_DWIspace.nii.gz
10118
/home/grg/spm/ROIvent/10118_latvent_dilated_DWIspace.nii.gz
10151
/home/grg/spm/ROIvent/10151_latvent_dilated_DWIspace.nii.gz
10156
/home/grg/spm/ROIvent/10156_latvent_dilated_DWIspace.nii.gz
10158
/home/grg/spm/ROIvent/10158_latvent_dilated_DWIspace.nii.gz
10166
/home/grg/spm/ROIvent/10166_latvent_dilated_DWIspace.nii.gz
10170
/home/grg/spm/ROIvent/10170_latvent_dilated_DWIspace.nii.gz
10178
/home/grg/spm/ROIvent/10178_latvent_dilated_DWIspace.nii.gz
10182
/home/grg/spm/ROIvent/10182_latvent_dilated_DWIspace.nii.gz
10199
/home/grg/spm/ROIvent/10199_latvent_dilated_DWIspace.nii.gz
10200
/home/grg/spm/ROIvent/10200_latvent_dilated_DWIspace.nii.gz
10213
/home/grg/spm/ROIvent/10213_latvent_dilated_DWIspace.nii.gz
10217
/home/grg/spm/ROIvent/10217_latvent_dilated_DWIspace.nii.gz
10239
/home/grg/spm/ROIvent/10239_latvent_dilated_DWIspace.nii.gz
10242
/home/grg/spm/ROIvent/10242_latvent_dilated_DWIspace.nii.gz
10245
/home/grg/spm/ROIvent/10245_latvent_dilated_DWIspace.nii.gz
10248
/home/grg/spm/ROIvent/10248_latvent_dilated_DWIspace.nii.gz
10251
/home/grg/spm/ROIvent/10251_latvent_dilated_DWIspace.nii.gz
10253
/home/grg/spm/ROIvent/10253_latvent_dilated_DWIspace.nii.gz
10263
/home/grg/spm/ROIvent/10263_latvent_dilated_DWIspace.nii.gz
10265
/home/grg/spm/ROIvent/10265_latvent_dilated_DWIspace.nii.gz
10308
/home/grg/spm/ROIvent/10308_latvent_dilated_DWIspace.nii.gz
10313
/home/grg/spm/ROIvent/10313_latvent_dilated_DWIspace.nii.gz
10322
/home/grg/spm/ROIvent/10322_latvent_dilated_DWIspace.nii.gz
10325
/home/grg/spm/ROIvent/10325_latvent_dilated_DWIspace.nii.gz
10326
/home/grg/spm/ROIvent/10326_latvent_dilated_DWIspace.nii.gz
10329
/home/grg/spm/ROIvent/10329_latvent_dilated_DWIspace.nii.gz
10330
/home/grg/spm/ROIvent/10330_latvent_dilated_DWIspace.nii.gz
10354
/home/grg/spm/ROIvent/10354_latvent_dilated_DWIspace.nii.gz
10370
/home/grg/spm/ROIvent/10370_latvent_dilated_DWIspace.nii.gz
10385
/home/grg/spm/ROIvent/10385_latvent_dilated_DWIspace.nii.gz
10393
/home/grg/spm/ROIvent/10393_latvent_dilated_DWIspace.nii.gz
10417
/home/grg/spm/ROIvent/10417_latvent_dilated_DWIspace.nii.gz
10426
/home/grg/spm/ROIvent/10426_latvent_dilated_DWIspace.nii.gz
10528
/home/grg/spm/ROIvent/10528_latvent_dilated_DWIspace.nii.gz
10577
/home/grg/spm/ROIvent/10577_latvent_dilated_DWIspace.nii.gz
10678
/home/grg/spm/ROIvent/10678_latvent_dilated_DWIspace.nii.gz
10682
/home/grg/spm/ROIvent/10682_latvent_dilated_DWIspace.nii.gz
10697
/home/grg/spm/ROIvent/10697_latvent_dilated_DWIspace.nii.gz
10724
/home/grg/spm/ROIvent/10724_latvent_dilated_DWIspace.nii.gz
10821
/home/grg/spm/ROIvent/10821_latvent_dilated_DWIspace.nii.gz
10841
/home/grg/spm/ROIvent/10841_latvent_dilated_DWIspace.nii.gz
10850
/home/grg/spm/ROIvent/10850_latvent_dilated_DWIspace.nii.gz
10855
/home/grg/spm/ROIvent/10855_latvent_dilated_DWIspace.nii.gz
10858
/home/grg/spm/ROIvent/10858_latvent_dilated_DWIspace.nii.gz
10894
/home/grg/spm/ROIvent/10894_latvent_dilated_DWIspace.nii.gz
10900
/home/grg/spm/ROIvent/10900_latvent_dilated_DWIspace.nii.gz
10942
/home/grg/spm/ROIvent/10942_latvent_dilated_DWIspace.nii.gz
10946
/home/grg/spm/ROIvent/10946_latvent_dilated_DWIspace.nii.gz
11030
/home/grg/spm/ROIvent/11030_latvent_dilated_DWIspace.nii.gz
11063
/home/grg/spm/ROIvent/11063_latvent_dilated_DWIspace.nii.gz
11136
/home/grg/spm/ROIvent/11136_latvent_dilated_DWIspace.nii.gz
11137
/home/grg/spm/ROIvent/11137_latvent_dilated_DWIspace.nii.gz
11139
/home/grg/spm/ROIvent/11139_latvent_dilated_DWIspace.nii.gz
11152
/home/grg/spm/ROIvent/11152_latvent_dilated_DWIspace.nii.gz
11184
/home/grg/spm/ROIvent/11184_latvent_dilated_DWIspace.nii.gz
11257
/home/grg/spm/ROIvent/11257_latvent_dilated_DWIspace.nii.gz
11264
/home/grg/spm/ROIvent/11264_latvent_dilated_DWIspace.nii.gz
11426
/home/grg/spm/ROIvent/11426_latvent_dilated_DWIspace.nii.gz
11478
/home/grg/spm/ROIvent/11478_latvent_dilated_DWIspace.nii.gz
11590
/home/grg/spm/ROIvent/11590_latvent_dilated_DWIspace.nii.gz
11620
/home/grg/spm/ROIvent/11620_latvent_dilated_DWIspace.nii.gz
11679
/home/grg/spm/ROIvent/11679_latvent_dilated_DWIspace.nii.gz
11686
/home/grg/spm/ROIvent/11686_latvent_dilated_DWIspace.nii.gz
11830
/home/grg/spm/ROIvent/11830_latvent_dilated_DWIspace.nii.gz
12138
/home/grg/spm/ROIvent/12138_latvent_dilated_DWIspace.nii.gz
12239
/home/grg/spm/ROIvent/12239_latvent_dilated_DWIspace.nii.gz
12279
/home/grg/spm/ROIvent/12279_latvent_dilated_DWIspace.nii.gz
12327
/home/grg/spm/ROIvent/12327_latvent_dilated_DWIspace.nii.gz
12624
/home/grg/spm/ROIvent/12624_latvent_dilated_DWIspace.nii.gz
12699
/home/grg/spm/ROIvent/12699_latvent_dilated_DWIspace.nii.gz
12767
/home/grg/spm/ROIvent/12767_latvent_dilated_DWIspace.nii.gz
12861
/home/grg/spm/ROIvent/12861_latvent_dilated_DWIspace.nii.gz
12904
/home/grg/spm/ROIvent/12904_latvent_dilated_DWIspace.nii.gz
13059
/home/grg/spm/ROIvent/13059_latvent_dilated_DWIspace.nii.gz
13061
/home/grg/spm/ROIvent/13061_latvent_dilated_DWIspace.nii.gz
13144
/home/grg/spm/ROIvent/13144_latvent_dilated_DWIspace.nii.gz
13169
/home/grg/spm/ROIvent/13169_latvent_dilated_DWIspace.nii.gz
13188
/home/grg/spm/ROIvent/13188_latvent_dilated_DWIspace.nii.gz
13214
/home/grg/spm/ROIvent/13214_latvent_dilated_DWIspace.nii.gz
13215
/home/grg/spm/ROIvent/13215_latvent_dilated_DWIspace.nii.gz
13217
/home/grg/spm/ROIvent/13217_latvent_dilated_DWIspace.nii.gz
13238
/home/grg/spm/ROIvent/13238_latvent_dilated_DWIspace.nii.gz
13242
/home/grg/spm/ROIvent/13242_latvent_dilated_DWIspace.nii.gz
13312
/home/grg/spm/ROIvent/13312_latvent_dilated_DWIspace.nii.gz
13367
/home/grg/spm/ROIvent/13367_latvent_dilated_DWIspace.nii.gz
21042
/home/grg/spm/ROIvent/21042_latvent_dilated_DWIspace.nii.gz
21057
/home/grg/spm/ROIvent/21057_latvent_dilated_DWIspace.nii.gz
21073
/home/grg/spm/ROIvent/21073_latvent_dilated_DWIspace.nii.gz
44068
/home/grg/spm/ROIvent/44068_latvent_dilated_DWIspace.nii.gz
44091
/home/grg/spm/ROIvent/44091_latvent_dilated_DWIspace.nii.gz
44094
/home/grg/spm/ROIvent/44094_latvent_dilated_DWIspace.nii.gz
44119
/home/grg/spm/ROIvent/44119_latvent_dilated_DWIspace.nii.gz
44141
/home/grg/spm/ROIvent/44141_latvent_dilated_DWIspace.nii.gz
44151
/home/grg/spm/ROIvent/44151_latvent_dilated_DWIspace.nii.gz
44723
/home/grg/spm/ROIvent/44723_latvent_dilated_DWIspace.nii.gz
55057
/home/grg/spm/ROIvent/55057_latvent_dilated_DWIspace.nii.gz
55152
/home/grg/spm/ROIvent/55152_latvent_dilated_DWIspace.nii.gz
55216
/home/grg/spm/ROIvent/55216_latvent_dilated_DWIspace.nii.gz
55297
/home/grg/spm/ROIvent/55297_latvent_dilated_DWIspace.nii.gz
55323
/home/grg/spm/ROIvent/55323_latvent_dilated_DWIspace.nii.gz
55370
/home/grg/spm/ROIvent/55370_latvent_dilated_DWIspace.nii.gz
55469
/home/grg/spm/ROIvent/55469_latvent_dilated_DWIspace.nii.gz
55778
/home/grg/spm/ROIvent/55778_latvent_dilated_DWIspace.nii.gz
66019
/home/grg/spm/ROIvent/66019_latvent_dilated_DWIspace.nii.gz
66030
/home/grg/spm/ROIvent/66030_latvent_dilated_DWIspace.nii.gz
66042
/home/grg/spm/ROIvent/66042_latvent_dilated_DWIspace.nii.gz
66048
/home/grg/spm/ROIvent/66048_latvent_dilated_DWIspace.nii.gz
66050
/home/grg/spm/ROIvent/66050_latvent_dilated_DWIspace.nii.gz
66128
/home/grg/spm/ROIvent/66128_latvent_dilated_DWIspace.nii.gz
66133
/home/grg/spm/ROIvent/66133_latvent_dilated_DWIspace.nii.gz
66141
/home/grg/spm/ROIvent/66141_latvent_dilated_DWIspace.nii.gz
66169
/home/grg/spm/ROIvent/66169_latvent_dilated_DWIspace.nii.gz
66183
/home/grg/spm/ROIvent/66183_latvent_dilated_DWIspace.nii.gz
66264
/home/grg/spm/ROIvent/66264_latvent_dilated_DWIspace.nii.gz
66267
/home/grg/spm/ROIvent/66267_latvent_dilated_DWIspace.nii.gz
66268
/home/grg/spm/ROIvent/66268_latvent_dilated_DWIspace.nii.gz
66293
/home/grg/spm/ROIvent/66293_latvent_dilated_DWIspace.nii.gz
66335
/home/grg/spm/ROIvent/66335_latvent_dilated_DWIspace.nii.gz
66361
/home/grg/spm/ROIvent/66361_latvent_dilated_DWIspace.nii.gz
66498
/home/grg/spm/ROIvent/66498_latvent_dilated_DWIspace.nii.gz
77024
/home/grg/spm/ROIvent/77024_latvent_dilated_DWIspace.nii.gz
77037
/home/grg/spm/ROIvent/77037_latvent_dilated_DWIspace.nii.gz
77076
/home/grg/spm/ROIvent/77076_latvent_dilated_DWIspace.nii.gz
77151
/home/grg/spm/ROIvent/77151_latvent_dilated_DWIspace.nii.gz
77175
/home/grg/spm/ROIvent/77175_latvent_dilated_DWIspace.nii.gz
77188
/home/grg/spm/ROIvent/77188_latvent_dilated_DWIspace.nii.gz
77252
/home/grg/spm/ROIvent/77252_latvent_dilated_DWIspace.nii.gz
77263
/home/grg/spm/ROIvent/77263_latvent_dilated_DWIspace.nii.gz
10016
/home/grg/spm/ROIvent/10016_latvent_dilated_DWIspace.nii.gz
10025
/home/grg/spm/ROIvent/10025_latvent_dilated_DWIspace.nii.gz
10026
/home/grg/spm/ROIvent/10026_latvent_dilated_DWIspace.nii.gz
10029
/home/grg/spm/ROIvent/10029_latvent_dilated_DWIspace.nii.gz
10034
/home/grg/spm/ROIvent/10034_latvent_dilated_DWIspace.nii.gz
10035
/home/grg/spm/ROIvent/10035_latvent_dilated_DWIspace.nii.gz
10051
/home/grg/spm/ROIvent/10051_latvent_dilated_DWIspace.nii.gz
10099
/home/grg/spm/ROIvent/10099_latvent_dilated_DWIspace.nii.gz
10106
/home/grg/spm/ROIvent/10106_latvent_dilated_DWIspace.nii.gz
10134
/home/grg/spm/ROIvent/10134_latvent_dilated_DWIspace.nii.gz
10160
/home/grg/spm/ROIvent/10160_latvent_dilated_DWIspace.nii.gz
10162
/home/grg/spm/ROIvent/10162_latvent_dilated_DWIspace.nii.gz
10225
/home/grg/spm/ROIvent/10225_latvent_dilated_DWIspace.nii.gz
10226
/home/grg/spm/ROIvent/10226_latvent_dilated_DWIspace.nii.gz
10259
/home/grg/spm/ROIvent/10259_latvent_dilated_DWIspace.nii.gz
10317
/home/grg/spm/ROIvent/10317_latvent_dilated_DWIspace.nii.gz
10319
/home/grg/spm/ROIvent/10319_latvent_dilated_DWIspace.nii.gz
10324
/home/grg/spm/ROIvent/10324_latvent_dilated_DWIspace.nii.gz
10333
/home/grg/spm/ROIvent/10333_latvent_dilated_DWIspace.nii.gz
10338
/home/grg/spm/ROIvent/10338_latvent_dilated_DWIspace.nii.gz
10346
/home/grg/spm/ROIvent/10346_latvent_dilated_DWIspace.nii.gz
10361
/home/grg/spm/ROIvent/10361_latvent_dilated_DWIspace.nii.gz
10362
/home/grg/spm/ROIvent/10362_latvent_dilated_DWIspace.nii.gz
10396
/home/grg/spm/ROIvent/10396_latvent_dilated_DWIspace.nii.gz
10397
/home/grg/spm/ROIvent/10397_latvent_dilated_DWIspace.nii.gz
10416
/home/grg/spm/ROIvent/10416_latvent_dilated_DWIspace.nii.gz
10418
/home/grg/spm/ROIvent/10418_latvent_dilated_DWIspace.nii.gz
10433
/home/grg/spm/ROIvent/10433_latvent_dilated_DWIspace.nii.gz
10436
/home/grg/spm/ROIvent/10436_latvent_dilated_DWIspace.nii.gz
10450
/home/grg/spm/ROIvent/10450_latvent_dilated_DWIspace.nii.gz
10453
/home/grg/spm/ROIvent/10453_latvent_dilated_DWIspace.nii.gz
10461
/home/grg/spm/ROIvent/10461_latvent_dilated_DWIspace.nii.gz
10482
/home/grg/spm/ROIvent/10482_latvent_dilated_DWIspace.nii.gz
10493
/home/grg/spm/ROIvent/10493_latvent_dilated_DWIspace.nii.gz
10504
/home/grg/spm/ROIvent/10504_latvent_dilated_DWIspace.nii.gz
10522
/home/grg/spm/ROIvent/10522_latvent_dilated_DWIspace.nii.gz
10538
/home/grg/spm/ROIvent/10538_latvent_dilated_DWIspace.nii.gz
10541
/home/grg/spm/ROIvent/10541_latvent_dilated_DWIspace.nii.gz
10550
/home/grg/spm/ROIvent/10550_latvent_dilated_DWIspace.nii.gz
10593
/home/grg/spm/ROIvent/10593_latvent_dilated_DWIspace.nii.gz
10634
/home/grg/spm/ROIvent/10634_latvent_dilated_DWIspace.nii.gz
10657
/home/grg/spm/ROIvent/10657_latvent_dilated_DWIspace.nii.gz
10696
/home/grg/spm/ROIvent/10696_latvent_dilated_DWIspace.nii.gz
10735
/home/grg/spm/ROIvent/10735_latvent_dilated_DWIspace.nii.gz
10741
/home/grg/spm/ROIvent/10741_latvent_dilated_DWIspace.nii.gz
10744
/home/grg/spm/ROIvent/10744_latvent_dilated_DWIspace.nii.gz
10750
/home/grg/spm/ROIvent/10750_latvent_dilated_DWIspace.nii.gz
10778
/home/grg/spm/ROIvent/10778_latvent_dilated_DWIspace.nii.gz
10787
/home/grg/spm/ROIvent/10787_latvent_dilated_DWIspace.nii.gz
10794
/home/grg/spm/ROIvent/10794_latvent_dilated_DWIspace.nii.gz
10811
/home/grg/spm/ROIvent/10811_latvent_dilated_DWIspace.nii.gz
10822
/home/grg/spm/ROIvent/10822_latvent_dilated_DWIspace.nii.gz
10846
/home/grg/spm/ROIvent/10846_latvent_dilated_DWIspace.nii.gz
10870
/home/grg/spm/ROIvent/10870_latvent_dilated_DWIspace.nii.gz
10881
/home/grg/spm/ROIvent/10881_latvent_dilated_DWIspace.nii.gz
10901
/home/grg/spm/ROIvent/10901_latvent_dilated_DWIspace.nii.gz
10944
/home/grg/spm/ROIvent/10944_latvent_dilated_DWIspace.nii.gz
10972
/home/grg/spm/ROIvent/10972_latvent_dilated_DWIspace.nii.gz
10988
/home/grg/spm/ROIvent/10988_latvent_dilated_DWIspace.nii.gz
11007
/home/grg/spm/ROIvent/11007_latvent_dilated_DWIspace.nii.gz
11012
/home/grg/spm/ROIvent/11012_latvent_dilated_DWIspace.nii.gz
11019
/home/grg/spm/ROIvent/11019_latvent_dilated_DWIspace.nii.gz
11054
/home/grg/spm/ROIvent/11054_latvent_dilated_DWIspace.nii.gz
11092
/home/grg/spm/ROIvent/11092_latvent_dilated_DWIspace.nii.gz
11127
/home/grg/spm/ROIvent/11127_latvent_dilated_DWIspace.nii.gz
11156
/home/grg/spm/ROIvent/11156_latvent_dilated_DWIspace.nii.gz
11196
/home/grg/spm/ROIvent/11196_latvent_dilated_DWIspace.nii.gz
11201
/home/grg/spm/ROIvent/11201_latvent_dilated_DWIspace.nii.gz
11219
/home/grg/spm/ROIvent/11219_latvent_dilated_DWIspace.nii.gz
11222
/home/grg/spm/ROIvent/11222_latvent_dilated_DWIspace.nii.gz
11245
/home/grg/spm/ROIvent/11245_latvent_dilated_DWIspace.nii.gz
11247
/home/grg/spm/ROIvent/11247_latvent_dilated_DWIspace.nii.gz
11254
/home/grg/spm/ROIvent/11254_latvent_dilated_DWIspace.nii.gz
11292
/home/grg/spm/ROIvent/11292_latvent_dilated_DWIspace.nii.gz
11323
/home/grg/spm/ROIvent/11323_latvent_dilated_DWIspace.nii.gz
11327
/home/grg/spm/ROIvent/11327_latvent_dilated_DWIspace.nii.gz
11355
/home/grg/spm/ROIvent/11355_latvent_dilated_DWIspace.nii.gz
11383
/home/grg/spm/ROIvent/11383_latvent_dilated_DWIspace.nii.gz
11415
/home/grg/spm/ROIvent/11415_latvent_dilated_DWIspace.nii.gz
11458
/home/grg/spm/ROIvent/11458_latvent_dilated_DWIspace.nii.gz
11461
/home/grg/spm/ROIvent/11461_latvent_dilated_DWIspace.nii.gz
11474
/home/grg/spm/ROIvent/11474_latvent_dilated_DWIspace.nii.gz
11481
/home/grg/spm/ROIvent/11481_latvent_dilated_DWIspace.nii.gz
11514
/home/grg/spm/ROIvent/11514_latvent_dilated_DWIspace.nii.gz
11552
/home/grg/spm/ROIvent/11552_latvent_dilated_DWIspace.nii.gz
11583
/home/grg/spm/ROIvent/11583_latvent_dilated_DWIspace.nii.gz
11630
/home/grg/spm/ROIvent/11630_latvent_dilated_DWIspace.nii.gz
11641
/home/grg/spm/ROIvent/11641_latvent_dilated_DWIspace.nii.gz
11747
/home/grg/spm/ROIvent/11747_latvent_dilated_DWIspace.nii.gz
11778
/home/grg/spm/ROIvent/11778_latvent_dilated_DWIspace.nii.gz
11850
/home/grg/spm/ROIvent/11850_latvent_dilated_DWIspace.nii.gz
11872
/home/grg/spm/ROIvent/11872_latvent_dilated_DWIspace.nii.gz
11937
/home/grg/spm/ROIvent/11937_latvent_dilated_DWIspace.nii.gz
11943
/home/grg/spm/ROIvent/11943_latvent_dilated_DWIspace.nii.gz
12056
/home/grg/spm/ROIvent/12056_latvent_dilated_DWIspace.nii.gz
12186
/home/grg/spm/ROIvent/12186_latvent_dilated_DWIspace.nii.gz
12269
/home/grg/spm/ROIvent/12269_latvent_dilated_DWIspace.nii.gz
12296
/home/grg/spm/ROIvent/12296_latvent_dilated_DWIspace.nii.gz
12379
/home/grg/spm/ROIvent/12379_latvent_dilated_DWIspace.nii.gz
12409
/home/grg/spm/ROIvent/12409_latvent_dilated_DWIspace.nii.gz
12548
/home/grg/spm/ROIvent/12548_latvent_dilated_DWIspace.nii.gz
12715
/home/grg/spm/ROIvent/12715_latvent_dilated_DWIspace.nii.gz
12724
/home/grg/spm/ROIvent/12724_latvent_dilated_DWIspace.nii.gz
12771
/home/grg/spm/ROIvent/12771_latvent_dilated_DWIspace.nii.gz
12778
/home/grg/spm/ROIvent/12778_latvent_dilated_DWIspace.nii.gz
12810
/home/grg/spm/ROIvent/12810_latvent_dilated_DWIspace.nii.gz
12812
/home/grg/spm/ROIvent/12812_latvent_dilated_DWIspace.nii.gz
12823
/home/grg/spm/ROIvent/12823_latvent_dilated_DWIspace.nii.gz
12858
/home/grg/spm/ROIvent/12858_latvent_dilated_DWIspace.nii.gz
12874
/home/grg/spm/ROIvent/12874_latvent_dilated_DWIspace.nii.gz
12878
/home/grg/spm/ROIvent/12878_latvent_dilated_DWIspace.nii.gz
12941
/home/grg/spm/ROIvent/12941_latvent_dilated_DWIspace.nii.gz
12947
/home/grg/spm/ROIvent/12947_latvent_dilated_DWIspace.nii.gz
12995
/home/grg/spm/ROIvent/12995_latvent_dilated_DWIspace.nii.gz
13019
/home/grg/spm/ROIvent/13019_latvent_dilated_DWIspace.nii.gz
13043
/home/grg/spm/ROIvent/13043_latvent_dilated_DWIspace.nii.gz
13049
/home/grg/spm/ROIvent/13049_latvent_dilated_DWIspace.nii.gz
13063
/home/grg/spm/ROIvent/13063_latvent_dilated_DWIspace.nii.gz
13105
/home/grg/spm/ROIvent/13105_latvent_dilated_DWIspace.nii.gz
13127
/home/grg/spm/ROIvent/13127_latvent_dilated_DWIspace.nii.gz
13151
/home/grg/spm/ROIvent/13151_latvent_dilated_DWIspace.nii.gz
13236
/home/grg/spm/ROIvent/13236_latvent_dilated_DWIspace.nii.gz
13268
/home/grg/spm/ROIvent/13268_latvent_dilated_DWIspace.nii.gz
13293
/home/grg/spm/ROIvent/13293_latvent_dilated_DWIspace.nii.gz
13309
/home/grg/spm/ROIvent/13309_latvent_dilated_DWIspace.nii.gz
13322
/home/grg/spm/ROIvent/13322_latvent_dilated_DWIspace.nii.gz
13417
/home/grg/spm/ROIvent/13417_latvent_dilated_DWIspace.nii.gz
21012
/home/grg/spm/ROIvent/21012_latvent_dilated_DWIspace.nii.gz
21051
/home/grg/spm/ROIvent/21051_latvent_dilated_DWIspace.nii.gz
21056
/home/grg/spm/ROIvent/21056_latvent_dilated_DWIspace.nii.gz
21084
/home/grg/spm/ROIvent/21084_latvent_dilated_DWIspace.nii.gz
44004
/home/grg/spm/ROIvent/44004_latvent_dilated_DWIspace.nii.gz
44043
/home/grg/spm/ROIvent/44043_latvent_dilated_DWIspace.nii.gz
44057
/home/grg/spm/ROIvent/44057_latvent_dilated_DWIspace.nii.gz
44147
/home/grg/spm/ROIvent/44147_latvent_dilated_DWIspace.nii.gz
44491
/home/grg/spm/ROIvent/44491_latvent_dilated_DWIspace.nii.gz
44632
/home/grg/spm/ROIvent/44632_latvent_dilated_DWIspace.nii.gz
55200
/home/grg/spm/ROIvent/55200_latvent_dilated_DWIspace.nii.gz
55483
/home/grg/spm/ROIvent/55483_latvent_dilated_DWIspace.nii.gz
55667
/home/grg/spm/ROIvent/55667_latvent_dilated_DWIspace.nii.gz
55708
/home/grg/spm/ROIvent/55708_latvent_dilated_DWIspace.nii.gz
55734
/home/grg/spm/ROIvent/55734_latvent_dilated_DWIspace.nii.gz
66017
/home/grg/spm/ROIvent/66017_latvent_dilated_DWIspace.nii.gz
66026
/home/grg/spm/ROIvent/66026_latvent_dilated_DWIspace.nii.gz
66039
/home/grg/spm/ROIvent/66039_latvent_dilated_DWIspace.nii.gz
66131
/home/grg/spm/ROIvent/66131_latvent_dilated_DWIspace.nii.gz
66162
/home/grg/spm/ROIvent/66162_latvent_dilated_DWIspace.nii.gz
66368
/home/grg/spm/ROIvent/66368_latvent_dilated_DWIspace.nii.gz
77027
/home/grg/spm/ROIvent/77027_latvent_dilated_DWIspace.nii.gz
77034
/home/grg/spm/ROIvent/77034_latvent_dilated_DWIspace.nii.gz
77040
/home/grg/spm/ROIvent/77040_latvent_dilated_DWIspace.nii.gz
77044
/home/grg/spm/ROIvent/77044_latvent_dilated_DWIspace.nii.gz
77056
/home/grg/spm/ROIvent/77056_latvent_dilated_DWIspace.nii.gz
77096
/home/grg/spm/ROIvent/77096_latvent_dilated_DWIspace.nii.gz
77117
/home/grg/spm/ROIvent/77117_latvent_dilated_DWIspace.nii.gz
77130
/home/grg/spm/ROIvent/77130_latvent_dilated_DWIspace.nii.gz
77140
/home/grg/spm/ROIvent/77140_latvent_dilated_DWIspace.nii.gz
77192
/home/grg/spm/ROIvent/77192_latvent_dilated_DWIspace.nii.gz
77217
/home/grg/spm/ROIvent/77217_latvent_dilated_DWIspace.nii.gz
77254
/home/grg/spm/ROIvent/77254_latvent_dilated_DWIspace.nii.gz
10065
/home/grg/spm/ROIvent/10065_latvent_dilated_DWIspace.nii.gz
10071
/home/grg/spm/ROIvent/10071_latvent_dilated_DWIspace.nii.gz
10096
/home/grg/spm/ROIvent/10096_latvent_dilated_DWIspace.nii.gz
10144
/home/grg/spm/ROIvent/10144_latvent_dilated_DWIspace.nii.gz
10180
/home/grg/spm/ROIvent/10180_latvent_dilated_DWIspace.nii.gz
10212
/home/grg/spm/ROIvent/10212_latvent_dilated_DWIspace.nii.gz
10298
/home/grg/spm/ROIvent/10298_latvent_dilated_DWIspace.nii.gz
10334
/home/grg/spm/ROIvent/10334_latvent_dilated_DWIspace.nii.gz
10367
/home/grg/spm/ROIvent/10367_latvent_dilated_DWIspace.nii.gz
10496
/home/grg/spm/ROIvent/10496_latvent_dilated_DWIspace.nii.gz
10515
/home/grg/spm/ROIvent/10515_latvent_dilated_DWIspace.nii.gz
10613
/home/grg/spm/ROIvent/10613_latvent_dilated_DWIspace.nii.gz
10701
/home/grg/spm/ROIvent/10701_latvent_dilated_DWIspace.nii.gz
11015
/home/grg/spm/ROIvent/11015_latvent_dilated_DWIspace.nii.gz
11042
/home/grg/spm/ROIvent/11042_latvent_dilated_DWIspace.nii.gz
11114
/home/grg/spm/ROIvent/11114_latvent_dilated_DWIspace.nii.gz
11213
/home/grg/spm/ROIvent/11213_latvent_dilated_DWIspace.nii.gz
11291
/home/grg/spm/ROIvent/11291_latvent_dilated_DWIspace.nii.gz
11540
/home/grg/spm/ROIvent/11540_latvent_dilated_DWIspace.nii.gz
11561
/home/grg/spm/ROIvent/11561_latvent_dilated_DWIspace.nii.gz
11592
/home/grg/spm/ROIvent/11592_latvent_dilated_DWIspace.nii.gz
11593
/home/grg/spm/ROIvent/11593_latvent_dilated_DWIspace.nii.gz
11646
/home/grg/spm/ROIvent/11646_latvent_dilated_DWIspace.nii.gz
11656
/home/grg/spm/ROIvent/11656_latvent_dilated_DWIspace.nii.gz
11687
/home/grg/spm/ROIvent/11687_latvent_dilated_DWIspace.nii.gz
11711
/home/grg/spm/ROIvent/11711_latvent_dilated_DWIspace.nii.gz
11796
/home/grg/spm/ROIvent/11796_latvent_dilated_DWIspace.nii.gz
11829
/home/grg/spm/ROIvent/11829_latvent_dilated_DWIspace.nii.gz
11874
/home/grg/spm/ROIvent/11874_latvent_dilated_DWIspace.nii.gz
11882
/home/grg/spm/ROIvent/11882_latvent_dilated_DWIspace.nii.gz
11939
/home/grg/spm/ROIvent/11939_latvent_dilated_DWIspace.nii.gz
12125
/home/grg/spm/ROIvent/12125_latvent_dilated_DWIspace.nii.gz
12133
/home/grg/spm/ROIvent/12133_latvent_dilated_DWIspace.nii.gz
12172
/home/grg/spm/ROIvent/12172_latvent_dilated_DWIspace.nii.gz
12271
/home/grg/spm/ROIvent/12271_latvent_dilated_DWIspace.nii.gz
12304
/home/grg/spm/ROIvent/12304_latvent_dilated_DWIspace.nii.gz
12308
/home/grg/spm/ROIvent/12308_latvent_dilated_DWIspace.nii.gz
12356
/home/grg/spm/ROIvent/12356_latvent_dilated_DWIspace.nii.gz
12391
/home/grg/spm/ROIvent/12391_latvent_dilated_DWIspace.nii.gz
12483
/home/grg/spm/ROIvent/12483_latvent_dilated_DWIspace.nii.gz
12502
/home/grg/spm/ROIvent/12502_latvent_dilated_DWIspace.nii.gz
12511
/home/grg/spm/ROIvent/12511_latvent_dilated_DWIspace.nii.gz
12582
/home/grg/spm/ROIvent/12582_latvent_dilated_DWIspace.nii.gz
12636
/home/grg/spm/ROIvent/12636_latvent_dilated_DWIspace.nii.gz
12711
/home/grg/spm/ROIvent/12711_latvent_dilated_DWIspace.nii.gz
12765
/home/grg/spm/ROIvent/12765_latvent_dilated_DWIspace.nii.gz
12785
/home/grg/spm/ROIvent/12785_latvent_dilated_DWIspace.nii.gz
12893
/home/grg/spm/ROIvent/12893_latvent_dilated_DWIspace.nii.gz
12963
/home/grg/spm/ROIvent/12963_latvent_dilated_DWIspace.nii.gz
12975
/home/grg/spm/ROIvent/12975_latvent_dilated_DWIspace.nii.gz
13083
/home/grg/spm/ROIvent/13083_latvent_dilated_DWIspace.nii.gz
13244
/home/grg/spm/ROIvent/13244_latvent_dilated_DWIspace.nii.gz
13306
/home/grg/spm/ROIvent/13306_latvent_dilated_DWIspace.nii.gz
13345
/home/grg/spm/ROIvent/13345_latvent_dilated_DWIspace.nii.gz
21039
/home/grg/spm/ROIvent/21039_latvent_dilated_DWIspace.nii.gz
21130
/home/grg/spm/ROIvent/21130_latvent_dilated_DWIspace.nii.gz
44229
/home/grg/spm/ROIvent/44229_latvent_dilated_DWIspace.nii.gz
44660
/home/grg/spm/ROIvent/44660_latvent_dilated_DWIspace.nii.gz
55388
/home/grg/spm/ROIvent/55388_latvent_dilated_DWIspace.nii.gz
55630
/home/grg/spm/ROIvent/55630_latvent_dilated_DWIspace.nii.gz
66085
/home/grg/spm/ROIvent/66085_latvent_dilated_DWIspace.nii.gz
66257
/home/grg/spm/ROIvent/66257_latvent_dilated_DWIspace.nii.gz
66309
/home/grg/spm/ROIvent/66309_latvent_dilated_DWIspace.nii.gz
77047
/home/grg/spm/ROIvent/77047_latvent_dilated_DWIspace.nii.gz
77179
/home/grg/spm/ROIvent/77179_latvent_dilated_DWIspace.nii.gz

In [253]:
df_dwi = pd.DataFrame(data_dwispace, columns=['subject', 'group', 'age', 'agesq', 'gender', 'educyears', 'mdl', 'mdr', 'vl', 'vr'], index=subjects)
df_dwi.drop(10657, inplace=True) # ventricles failed
df_dwi.drop(10701, inplace=True) # ventricles failed
df_dwi.drop(21057, inplace=True) # ventricles failed
del df_dwi['subject']
df_dwi.to_excel('/tmp/roi_dwi.xls')

In [254]:
df_dwi = pd.read_excel('/tmp/roi_dwi.xls')
axes = pd.scatter_matrix(df_dwi, figsize=(30,30))
corr = df_dwi.corr().as_matrix()
for i, j in zip(*plt.np.triu_indices_from(axes, k=1)):
    axes[i, j].annotate("%.3f" %corr[i,j], (0.8, 0.8), xycoords='axes fraction', ha='center', va='center')

plt.show()



In [255]:
fig = plt.figure(figsize=(6,6))
ax = fig.add_subplot(1,1,1)
ax.scatter(df_mni['vl'], df_mni['mdl']*1000.0, c='b', s=5, label='left perivent. (MNI space)')
ax.scatter(df_mni['vr'], df_mni['mdr']*1000.0, c='r', s=5, label='right perivent. (MNI space)')
ax.scatter(df_dwi['vl'], df_dwi['mdl']*1000.0, c='y', s=5, label='left perivent. (native DWI space)')
ax.scatter(df_dwi['vr'], df_dwi['mdr']*1000.0, c='m', s=5, label='right perivent. (native DWI space)')
ax.scatter(df['vl'], df['mdl']*1000.0, c='g', s=5, label='left perivent. (native T1 space)')
ax.scatter(df['vr'], df['mdr']*1000.0, c='c', s=5, label='right perivent. (native T1 space)')
plt.xlim([0, 30])
plt.ylim(0.85)
plt.legend(loc='upper left',prop={'size':10});
fig.suptitle('Periventricular MD values in 3 different spaces in relation to ventricular volumes', fontsize=10)
plt.xlabel('Ventricular volumes', fontsize=10)
plt.ylabel('MD mean values (.1e3)', fontsize=10)
df2 = pd.DataFrame(df_mni, columns=['vl', 'mdl'])
print df2.corr()
df2 = pd.DataFrame(df_mni, columns=['vr', 'mdr'])
print df2.corr()


           vl       mdl
vl   1.000000  0.951202
mdl  0.951202  1.000000
           vr       mdr
vr   1.000000  0.948543
mdr  0.948543  1.000000

In [256]:
fig = plt.figure(figsize=(6,6))
ax = fig.add_subplot(1,1,1)
ax.scatter(df_mni['vl'], df_mni['mdl']*1000.0, c='b', s=5, label='left perivent. (MNI space)')
ax.scatter(df_mni['vr'], df_mni['mdr']*1000.0, c='r', s=5, label='right perivent. (MNI space)')

df2 = pd.DataFrame(df_mni, columns=['vl', 'mdl'])
cc= df2.corr()['mdl']
print cc.tolist()
ax.text(17, 1.02, 'corr. coeff. (left): %.3f'%df2.corr()['mdl'][0], fontsize=10)
df2 = pd.DataFrame(df_mni, columns=['vr', 'mdr'])
print df2.corr()
ax.text(17, 0.92, 'corr. coeff. (right): %.3f'%df2.corr()['mdr'][0], fontsize=10)
plt.xlim([0, 30])
plt.ylim(0.85)
plt.legend(loc='upper left',prop={'size':10});
fig.suptitle('Periventricular MD values in MNI space', fontsize=10)
plt.xlabel('Ventricular volumes', fontsize=10)
plt.ylabel('MD mean values (.1e3)', fontsize=10)


[0.9512017839818151, 1.0]
           vr       mdr
vr   1.000000  0.948543
mdr  0.948543  1.000000
Out[256]:
<matplotlib.text.Text at 0x7f014b6a4690>

In [257]:
fig = plt.figure(figsize=(6,6))
ax = fig.add_subplot(1,1,1)
ax.scatter(df_mni['vl'], df_mni['age'], c='b', s=5, label='left ventricle')
ax.scatter(df_mni['vr'], df_mni['age'], c='r', s=5, label='right ventricle')

df2 = pd.DataFrame(df_mni, columns=['vl', 'age'])
cc= df2.corr()['age']
print cc.tolist()
ax.text(17, 17000, 'corr. coeff. (left): %.3f'%df2.corr()['age'][0], fontsize=10)
df2 = pd.DataFrame(df_mni, columns=['vr', 'age'])
print df2.corr()
ax.text(17, 17500, 'corr. coeff. (right): %.3f'%df2.corr()['age'][0], fontsize=10)
plt.xlim([0, 30])
#plt.ylim(0.85)
plt.legend(loc='upper left', prop={'size':10})
fig.suptitle('Age and ventricular volumes', fontsize=10)
plt.xlabel('Ventricular volumes', fontsize=10)
plt.ylabel('Age', fontsize=10)


[0.42770406793071375, 1.0]
           vr       age
vr   1.000000  0.428469
age  0.428469  1.000000
Out[257]:
<matplotlib.text.Text at 0x7f0146d10850>

In [258]:
fig = plt.figure(figsize=(6,6))
ax = fig.add_subplot(111)
ax.scatter(df_dwi['vl'], df_dwi['mdl']*1000.0, c='y', s=5, label='left perivent. (native DWI space)')
ax.scatter(df_dwi['vr'], df_dwi['mdr']*1000.0, c='m', s=5, label='right perivent. (native DWI space)')

df2 = pd.DataFrame(df_dwi, columns=['vl', 'mdl'])
cc= df2.corr()['mdl']
print cc.tolist()
ax.text(17, 0.95, 'corr. coeff. (left): %.3f'%df2.corr()['mdl'][0], fontsize=10)
df2 = pd.DataFrame(df_dwi, columns=['vr', 'mdr'])
print df2.corr()
ax.text(17, 0.92, 'corr. coeff. (right): %.3f'%df2.corr()['mdr'][0], fontsize=10)
plt.xlim([0, 30])
plt.ylim(0.85)
plt.legend(loc='upper left',prop={'size':10});
fig.suptitle('Periventricular MD values in native DWI space', fontsize=10)
plt.xlabel('Ventricular volumes', fontsize=10)
plt.ylabel('MD mean values (.1e3)', fontsize=10)


[0.45255225264523058, 1.0]
           vr       mdr
vr   1.000000  0.503251
mdr  0.503251  1.000000
Out[258]:
<matplotlib.text.Text at 0x7f014b9500d0>

In [259]:
fig = plt.figure(figsize=(6,6))
ax = fig.add_subplot(1,1,1)
ax.scatter(df['vl'], df['mdl']*1000.0, c='g', s=5, label='left perivent. (native T1 space)')
ax.scatter(df['vr'], df['mdr']*1000.0, c='c', s=5, label='right perivent. (native T1 space)')

df2 = pd.DataFrame(df, columns=['vl', 'mdl'])
cc= df2.corr()['mdl']
print cc.tolist()
ax.text(17, 0.95, 'corr. coeff. (left): %.3f'%df2.corr()['mdl'][0], fontsize=10)
df2 = pd.DataFrame(df, columns=['vr', 'mdr'])
print df2.corr()
ax.text(17, 0.92, 'corr. coeff. (right): %.3f'%df2.corr()['mdr'][0], fontsize=10)
plt.xlim([0, 30])
plt.ylim(0.85)
plt.legend(loc='upper left',prop={'size':10});
fig.suptitle('Periventricular MD values in native T1 space', fontsize=10)
plt.xlabel('Ventricular volumes', fontsize=10)
plt.ylabel('MD mean values (.1e3)', fontsize=10)


[0.40679155250651466, 1.0]
           vr       mdr
vr   1.000000  0.469821
mdr  0.469821  1.000000
Out[259]:
<matplotlib.text.Text at 0x7f014b45e890>

In [260]:
fig = plt.figure(figsize=(6,6))
ax = fig.add_subplot(1,1,1)
ax.scatter(df_dwi['vl'], df_dwi['mdl']*1000.0, c='y', s=5, label='MD mean values in left perivent. (native DWI space)')
ax.scatter(df_dwi['vr'], df_dwi['mdr']*1000.0, c='m', s=5, label='MD mean values in right perivent. (native DWI space)')
ax.scatter(df['vl'], df['mdl']*1000.0, c='g', s=5, label='MD mean values in left perivent. (native T1 space)')
ax.scatter(df['vr'], df['mdr']*1000.0, c='c', s=5, label='MD mean values in right perivent. (native T1 space)')

plt.xlim([0, 30])
plt.ylim(0.85)
plt.legend(loc='upper left');


Doing it on that periventricular supra-threshold cluster in the right hemisphere


In [6]:
#md_mni = glob('/home/grg/data/ALFA_DWI/*/DWI/*MD_MNIspace.nii.gz')
groups_size = [102, 44, 143, 160, 65]
groups_names = ['Apoe2-3', 'Apoe2-4', 'Apoe3-3', 'Apoe3-4', 'Apoe4-4']

groups = []
start = 0
for size in groups_size:
    g = subjects[start:start + size]
    start = start + size
    groups.append(g)

data_cluster = []
for s in subjects:
    try:
        print s
        perifp = '/tmp/label.nii.gz' #glob(osp.join(perid, '%s_latvent_dilated.nii.gz'%s))[0]
        print perifp
        mdmnifp = glob(osp.join(alfad, '%s*'%s, 'DWI', '%s*_MD_MNIspace.nii.gz'%s))[0]
        
        mdmni = np.array(nib.load(mdmnifp).dataobj)
        im_peri = nib.load(perifp)
        
        resample_im_peri = np.array(image.resample_to_img(im_peri, mdmnifp, interpolation='nearest').dataobj)
        
        cluster_meanval = np.mean(mdmni[np.abs(resample_im_peri-1)<0.5])
        #mdr = np.mean(mdmni[np.abs(resample_im_peri-1)<0.5])
        
        age = ages[str(s)]
        group = [s in each for each in groups].index(True)
        ey = educyears[str(s)]
        jdgvol = jdg_vvol[s]
        gender = genders[str(s)]
        #vl = vvol_l[s]# / tivs[str(s)]# +vvol_li[s]
        vr = vvol_r[s]# / tivs[str(s)]# + vvol_ri[s]
                
        row = [s, group, age, age*age, gender, ey, cluster_meanval, vr]
        data_cluster.append(row)
        
    except IndexError as e:
        print s, e


10070
/tmp/label.nii.gz
10102
/tmp/label.nii.gz
10108
/tmp/label.nii.gz
10235
/tmp/label.nii.gz
10365
/tmp/label.nii.gz
10419
/tmp/label.nii.gz
10463
/tmp/label.nii.gz
10530
/tmp/label.nii.gz
10551
/tmp/label.nii.gz
10563
/tmp/label.nii.gz
10576
/tmp/label.nii.gz
10630
/tmp/label.nii.gz
10668
/tmp/label.nii.gz
10692
/tmp/label.nii.gz
10693
/tmp/label.nii.gz
10703
/tmp/label.nii.gz
10725
/tmp/label.nii.gz
10737
/tmp/label.nii.gz
10756
/tmp/label.nii.gz
10809
/tmp/label.nii.gz
11045
/tmp/label.nii.gz
11047
/tmp/label.nii.gz
11048
/tmp/label.nii.gz
11133
/tmp/label.nii.gz
11180
/tmp/label.nii.gz
11225
/tmp/label.nii.gz
11262
/tmp/label.nii.gz
11305
/tmp/label.nii.gz
11351
/tmp/label.nii.gz
11360
/tmp/label.nii.gz
11387
/tmp/label.nii.gz
11407
/tmp/label.nii.gz
11414
/tmp/label.nii.gz
11416
/tmp/label.nii.gz
11550
/tmp/label.nii.gz
11610
/tmp/label.nii.gz
11614
/tmp/label.nii.gz
11638
/tmp/label.nii.gz
11658
/tmp/label.nii.gz
11691
/tmp/label.nii.gz
11721
/tmp/label.nii.gz
11737
/tmp/label.nii.gz
11768
/tmp/label.nii.gz
11798
/tmp/label.nii.gz
11803
/tmp/label.nii.gz
11858
/tmp/label.nii.gz
11902
/tmp/label.nii.gz
11941
/tmp/label.nii.gz
11975
/tmp/label.nii.gz
11979
/tmp/label.nii.gz
12032
/tmp/label.nii.gz
12067
/tmp/label.nii.gz
12079
/tmp/label.nii.gz
12121
/tmp/label.nii.gz
12140
/tmp/label.nii.gz
12174
/tmp/label.nii.gz
12244
/tmp/label.nii.gz
12252
/tmp/label.nii.gz
12323
/tmp/label.nii.gz
12324
/tmp/label.nii.gz
12331
/tmp/label.nii.gz
12399
/tmp/label.nii.gz
12425
/tmp/label.nii.gz
12445
/tmp/label.nii.gz
12479
/tmp/label.nii.gz
12484
/tmp/label.nii.gz
12493
/tmp/label.nii.gz
12516
/tmp/label.nii.gz
12637
/tmp/label.nii.gz
12659
/tmp/label.nii.gz
12730
/tmp/label.nii.gz
12783
/tmp/label.nii.gz
12787
/tmp/label.nii.gz
12841
/tmp/label.nii.gz
12920
/tmp/label.nii.gz
12970
/tmp/label.nii.gz
12976
/tmp/label.nii.gz
13008
/tmp/label.nii.gz
13035
/tmp/label.nii.gz
13075
/tmp/label.nii.gz
13090
/tmp/label.nii.gz
13118
/tmp/label.nii.gz
13138
/tmp/label.nii.gz
13235
/tmp/label.nii.gz
21092
/tmp/label.nii.gz
44046
/tmp/label.nii.gz
44205
/tmp/label.nii.gz
55166
/tmp/label.nii.gz
55529
/tmp/label.nii.gz
55538
/tmp/label.nii.gz
55854
/tmp/label.nii.gz
66089
/tmp/label.nii.gz
66125
/tmp/label.nii.gz
66159
/tmp/label.nii.gz
66239
/tmp/label.nii.gz
66240
/tmp/label.nii.gz
66270
/tmp/label.nii.gz
66312
/tmp/label.nii.gz
77068
/tmp/label.nii.gz
77093
/tmp/label.nii.gz
77094
/tmp/label.nii.gz
77195
/tmp/label.nii.gz
10015
/tmp/label.nii.gz
10041
/tmp/label.nii.gz
10090
/tmp/label.nii.gz
10150
/tmp/label.nii.gz
10282
/tmp/label.nii.gz
10486
/tmp/label.nii.gz
10518
/tmp/label.nii.gz
10536
/tmp/label.nii.gz
10645
/tmp/label.nii.gz
11038
/tmp/label.nii.gz
11144
/tmp/label.nii.gz
11191
/tmp/label.nii.gz
11195
/tmp/label.nii.gz
11252
/tmp/label.nii.gz
11436
/tmp/label.nii.gz
11597
/tmp/label.nii.gz
12015
/tmp/label.nii.gz
12122
/tmp/label.nii.gz
12245
/tmp/label.nii.gz
12417
/tmp/label.nii.gz
12704
/tmp/label.nii.gz
12772
/tmp/label.nii.gz
12930
/tmp/label.nii.gz
13054
/tmp/label.nii.gz
13070
/tmp/label.nii.gz
21002
/tmp/label.nii.gz
21011
/tmp/label.nii.gz
55351
/tmp/label.nii.gz
55353
/tmp/label.nii.gz
55355
/tmp/label.nii.gz
55488
/tmp/label.nii.gz
55539
/tmp/label.nii.gz
55636
/tmp/label.nii.gz
55793
/tmp/label.nii.gz
66020
/tmp/label.nii.gz
66094
/tmp/label.nii.gz
66164
/tmp/label.nii.gz
66341
/tmp/label.nii.gz
66492
/tmp/label.nii.gz
77109
/tmp/label.nii.gz
77152
/tmp/label.nii.gz
77191
/tmp/label.nii.gz
77224
/tmp/label.nii.gz
77241
/tmp/label.nii.gz
10013
/tmp/label.nii.gz
10023
/tmp/label.nii.gz
10024
/tmp/label.nii.gz
10028
/tmp/label.nii.gz
10032
/tmp/label.nii.gz
10036
/tmp/label.nii.gz
10038
/tmp/label.nii.gz
10040
/tmp/label.nii.gz
10042
/tmp/label.nii.gz
10049
/tmp/label.nii.gz
10052
/tmp/label.nii.gz
10053
/tmp/label.nii.gz
10056
/tmp/label.nii.gz
10081
/tmp/label.nii.gz
10117
/tmp/label.nii.gz
10118
/tmp/label.nii.gz
10151
/tmp/label.nii.gz
10156
/tmp/label.nii.gz
10158
/tmp/label.nii.gz
10166
/tmp/label.nii.gz
10170
/tmp/label.nii.gz
10178
/tmp/label.nii.gz
10182
/tmp/label.nii.gz
10199
/tmp/label.nii.gz
10200
/tmp/label.nii.gz
10213
/tmp/label.nii.gz
10217
/tmp/label.nii.gz
10239
/tmp/label.nii.gz
10242
/tmp/label.nii.gz
10245
/tmp/label.nii.gz
10248
/tmp/label.nii.gz
10251
/tmp/label.nii.gz
10253
/tmp/label.nii.gz
10263
/tmp/label.nii.gz
10265
/tmp/label.nii.gz
10308
/tmp/label.nii.gz
10313
/tmp/label.nii.gz
10322
/tmp/label.nii.gz
10325
/tmp/label.nii.gz
10326
/tmp/label.nii.gz
10329
/tmp/label.nii.gz
10330
/tmp/label.nii.gz
10354
/tmp/label.nii.gz
10370
/tmp/label.nii.gz
10385
/tmp/label.nii.gz
10393
/tmp/label.nii.gz
10417
/tmp/label.nii.gz
10426
/tmp/label.nii.gz
10528
/tmp/label.nii.gz
10577
/tmp/label.nii.gz
10678
/tmp/label.nii.gz
10682
/tmp/label.nii.gz
10697
/tmp/label.nii.gz
10724
/tmp/label.nii.gz
10821
/tmp/label.nii.gz
10841
/tmp/label.nii.gz
10850
/tmp/label.nii.gz
10855
/tmp/label.nii.gz
10858
/tmp/label.nii.gz
10894
/tmp/label.nii.gz
10900
/tmp/label.nii.gz
10942
/tmp/label.nii.gz
10946
/tmp/label.nii.gz
11030
/tmp/label.nii.gz
11063
/tmp/label.nii.gz
11136
/tmp/label.nii.gz
11137
/tmp/label.nii.gz
11139
/tmp/label.nii.gz
11152
/tmp/label.nii.gz
11184
/tmp/label.nii.gz
11257
/tmp/label.nii.gz
11264
/tmp/label.nii.gz
11426
/tmp/label.nii.gz
11478
/tmp/label.nii.gz
11590
/tmp/label.nii.gz
11620
/tmp/label.nii.gz
11679
/tmp/label.nii.gz
11686
/tmp/label.nii.gz
11830
/tmp/label.nii.gz
12138
/tmp/label.nii.gz
12239
/tmp/label.nii.gz
12279
/tmp/label.nii.gz
12327
/tmp/label.nii.gz
12624
/tmp/label.nii.gz
12699
/tmp/label.nii.gz
12767
/tmp/label.nii.gz
12861
/tmp/label.nii.gz
12904
/tmp/label.nii.gz
13059
/tmp/label.nii.gz
13061
/tmp/label.nii.gz
13144
/tmp/label.nii.gz
13169
/tmp/label.nii.gz
13188
/tmp/label.nii.gz
13214
/tmp/label.nii.gz
13215
/tmp/label.nii.gz
13217
/tmp/label.nii.gz
13238
/tmp/label.nii.gz
13242
/tmp/label.nii.gz
13312
/tmp/label.nii.gz
13367
/tmp/label.nii.gz
21042
/tmp/label.nii.gz
21057
/tmp/label.nii.gz
21073
/tmp/label.nii.gz
44068
/tmp/label.nii.gz
44091
/tmp/label.nii.gz
44094
/tmp/label.nii.gz
44119
/tmp/label.nii.gz
44141
/tmp/label.nii.gz
44151
/tmp/label.nii.gz
44723
/tmp/label.nii.gz
55057
/tmp/label.nii.gz
55152
/tmp/label.nii.gz
55216
/tmp/label.nii.gz
55297
/tmp/label.nii.gz
55323
/tmp/label.nii.gz
55370
/tmp/label.nii.gz
55469
/tmp/label.nii.gz
55778
/tmp/label.nii.gz
66019
/tmp/label.nii.gz
66030
/tmp/label.nii.gz
66042
/tmp/label.nii.gz
66048
/tmp/label.nii.gz
66050
/tmp/label.nii.gz
66128
/tmp/label.nii.gz
66133
/tmp/label.nii.gz
66141
/tmp/label.nii.gz
66169
/tmp/label.nii.gz
66183
/tmp/label.nii.gz
66264
/tmp/label.nii.gz
66267
/tmp/label.nii.gz
66268
/tmp/label.nii.gz
66293
/tmp/label.nii.gz
66335
/tmp/label.nii.gz
66361
/tmp/label.nii.gz
66498
/tmp/label.nii.gz
77024
/tmp/label.nii.gz
77037
/tmp/label.nii.gz
77076
/tmp/label.nii.gz
77151
/tmp/label.nii.gz
77175
/tmp/label.nii.gz
77188
/tmp/label.nii.gz
77252
/tmp/label.nii.gz
77263
/tmp/label.nii.gz
10016
/tmp/label.nii.gz
10025
/tmp/label.nii.gz
10026
/tmp/label.nii.gz
10029
/tmp/label.nii.gz
10034
/tmp/label.nii.gz
10035
/tmp/label.nii.gz
10051
/tmp/label.nii.gz
10099
/tmp/label.nii.gz
10106
/tmp/label.nii.gz
10134
/tmp/label.nii.gz
10160
/tmp/label.nii.gz
10162
/tmp/label.nii.gz
10225
/tmp/label.nii.gz
10226
/tmp/label.nii.gz
10259
/tmp/label.nii.gz
10317
/tmp/label.nii.gz
10319
/tmp/label.nii.gz
10324
/tmp/label.nii.gz
10333
/tmp/label.nii.gz
10338
/tmp/label.nii.gz
10346
/tmp/label.nii.gz
10361
/tmp/label.nii.gz
10362
/tmp/label.nii.gz
10396
/tmp/label.nii.gz
10397
/tmp/label.nii.gz
10416
/tmp/label.nii.gz
10418
/tmp/label.nii.gz
10433
/tmp/label.nii.gz
10436
/tmp/label.nii.gz
10450
/tmp/label.nii.gz
10453
/tmp/label.nii.gz
10461
/tmp/label.nii.gz
10482
/tmp/label.nii.gz
10493
/tmp/label.nii.gz
10504
/tmp/label.nii.gz
10522
/tmp/label.nii.gz
10538
/tmp/label.nii.gz
10541
/tmp/label.nii.gz
10550
/tmp/label.nii.gz
10593
/tmp/label.nii.gz
10634
/tmp/label.nii.gz
10657
/tmp/label.nii.gz
10696
/tmp/label.nii.gz
10735
/tmp/label.nii.gz
10741
/tmp/label.nii.gz
10744
/tmp/label.nii.gz
10750
/tmp/label.nii.gz
10778
/tmp/label.nii.gz
10787
/tmp/label.nii.gz
10794
/tmp/label.nii.gz
10811
/tmp/label.nii.gz
10822
/tmp/label.nii.gz
10846
/tmp/label.nii.gz
10870
/tmp/label.nii.gz
10881
/tmp/label.nii.gz
10901
/tmp/label.nii.gz
10944
/tmp/label.nii.gz
10972
/tmp/label.nii.gz
10988
/tmp/label.nii.gz
11007
/tmp/label.nii.gz
11012
/tmp/label.nii.gz
11019
/tmp/label.nii.gz
11054
/tmp/label.nii.gz
11092
/tmp/label.nii.gz
11127
/tmp/label.nii.gz
11156
/tmp/label.nii.gz
11196
/tmp/label.nii.gz
11201
/tmp/label.nii.gz
11219
/tmp/label.nii.gz
11222
/tmp/label.nii.gz
11245
/tmp/label.nii.gz
11247
/tmp/label.nii.gz
11254
/tmp/label.nii.gz
11292
/tmp/label.nii.gz
11323
/tmp/label.nii.gz
11327
/tmp/label.nii.gz
11355
/tmp/label.nii.gz
11383
/tmp/label.nii.gz
11415
/tmp/label.nii.gz
11458
/tmp/label.nii.gz
11461
/tmp/label.nii.gz
11474
/tmp/label.nii.gz
11481
/tmp/label.nii.gz
11514
/tmp/label.nii.gz
11552
/tmp/label.nii.gz
11583
/tmp/label.nii.gz
11630
/tmp/label.nii.gz
11641
/tmp/label.nii.gz
11747
/tmp/label.nii.gz
11778
/tmp/label.nii.gz
11850
/tmp/label.nii.gz
11872
/tmp/label.nii.gz
11937
/tmp/label.nii.gz
11943
/tmp/label.nii.gz
12056
/tmp/label.nii.gz
12186
/tmp/label.nii.gz
12269
/tmp/label.nii.gz
12296
/tmp/label.nii.gz
12379
/tmp/label.nii.gz
12409
/tmp/label.nii.gz
12548
/tmp/label.nii.gz
12715
/tmp/label.nii.gz
12724
/tmp/label.nii.gz
12771
/tmp/label.nii.gz
12778
/tmp/label.nii.gz
12810
/tmp/label.nii.gz
12812
/tmp/label.nii.gz
12823
/tmp/label.nii.gz
12858
/tmp/label.nii.gz
12874
/tmp/label.nii.gz
12878
/tmp/label.nii.gz
12941
/tmp/label.nii.gz
12947
/tmp/label.nii.gz
12995
/tmp/label.nii.gz
13019
/tmp/label.nii.gz
13043
/tmp/label.nii.gz
13049
/tmp/label.nii.gz
13063
/tmp/label.nii.gz
13105
/tmp/label.nii.gz
13127
/tmp/label.nii.gz
13151
/tmp/label.nii.gz
13236
/tmp/label.nii.gz
13268
/tmp/label.nii.gz
13293
/tmp/label.nii.gz
13309
/tmp/label.nii.gz
13322
/tmp/label.nii.gz
13417
/tmp/label.nii.gz
21012
/tmp/label.nii.gz
21051
/tmp/label.nii.gz
21056
/tmp/label.nii.gz
21084
/tmp/label.nii.gz
44004
/tmp/label.nii.gz
44043
/tmp/label.nii.gz
44057
/tmp/label.nii.gz
44147
/tmp/label.nii.gz
44491
/tmp/label.nii.gz
44632
/tmp/label.nii.gz
55200
/tmp/label.nii.gz
55483
/tmp/label.nii.gz
55667
/tmp/label.nii.gz
55708
/tmp/label.nii.gz
55734
/tmp/label.nii.gz
66017
/tmp/label.nii.gz
66026
/tmp/label.nii.gz
66039
/tmp/label.nii.gz
66131
/tmp/label.nii.gz
66162
/tmp/label.nii.gz
66368
/tmp/label.nii.gz
77027
/tmp/label.nii.gz
77034
/tmp/label.nii.gz
77040
/tmp/label.nii.gz
77044
/tmp/label.nii.gz
77056
/tmp/label.nii.gz
77096
/tmp/label.nii.gz
77117
/tmp/label.nii.gz
77130
/tmp/label.nii.gz
77140
/tmp/label.nii.gz
77192
/tmp/label.nii.gz
77217
/tmp/label.nii.gz
77254
/tmp/label.nii.gz
10065
/tmp/label.nii.gz
10071
/tmp/label.nii.gz
10096
/tmp/label.nii.gz
10144
/tmp/label.nii.gz
10180
/tmp/label.nii.gz
10212
/tmp/label.nii.gz
10298
/tmp/label.nii.gz
10334
/tmp/label.nii.gz
10367
/tmp/label.nii.gz
10496
/tmp/label.nii.gz
10515
/tmp/label.nii.gz
10613
/tmp/label.nii.gz
10701
/tmp/label.nii.gz
11015
/tmp/label.nii.gz
11042
/tmp/label.nii.gz
11114
/tmp/label.nii.gz
11213
/tmp/label.nii.gz
11291
/tmp/label.nii.gz
11540
/tmp/label.nii.gz
11561
/tmp/label.nii.gz
11592
/tmp/label.nii.gz
11593
/tmp/label.nii.gz
11646
/tmp/label.nii.gz
11656
/tmp/label.nii.gz
11687
/tmp/label.nii.gz
11711
/tmp/label.nii.gz
11796
/tmp/label.nii.gz
11829
/tmp/label.nii.gz
11874
/tmp/label.nii.gz
11882
/tmp/label.nii.gz
11939
/tmp/label.nii.gz
12125
/tmp/label.nii.gz
12133
/tmp/label.nii.gz
12172
/tmp/label.nii.gz
12271
/tmp/label.nii.gz
12304
/tmp/label.nii.gz
12308
/tmp/label.nii.gz
12356
/tmp/label.nii.gz
12391
/tmp/label.nii.gz
12483
/tmp/label.nii.gz
12502
/tmp/label.nii.gz
12511
/tmp/label.nii.gz
12582
/tmp/label.nii.gz
12636
/tmp/label.nii.gz
12711
/tmp/label.nii.gz
12765
/tmp/label.nii.gz
12785
/tmp/label.nii.gz
12893
/tmp/label.nii.gz
12963
/tmp/label.nii.gz
12975
/tmp/label.nii.gz
13083
/tmp/label.nii.gz
13244
/tmp/label.nii.gz
13306
/tmp/label.nii.gz
13345
/tmp/label.nii.gz
21039
/tmp/label.nii.gz
21130
/tmp/label.nii.gz
44229
/tmp/label.nii.gz
44660
/tmp/label.nii.gz
55388
/tmp/label.nii.gz
55630
/tmp/label.nii.gz
66085
/tmp/label.nii.gz
66257
/tmp/label.nii.gz
66309
/tmp/label.nii.gz
77047
/tmp/label.nii.gz
77179
/tmp/label.nii.gz

In [9]:
df_cluster = pd.DataFrame(data_cluster, columns=['subject', 'group', 'age', 'agesq', 'gender', 'educyears', 'cluster_meanval', 'vr'], index=subjects)
df_cluster.drop(10657, inplace=True) # ventricles failed
df_cluster.drop(10701, inplace=True) # ventricles failed
df_cluster.drop(21057, inplace=True) # ventricles failed
del df_cluster['subject']
df_cluster.to_excel('/tmp/roi_cluster.xls')

In [30]:
fig = plt.figure(figsize=(6,6))
ax = fig.add_subplot(1,1,1)
colors = ['r','g','b','y','m']
for i in xrange(5):
    dfi = df_cluster[df_cluster['group']==i]
    #ax.scatter(dfi['vr'], dfi['cluster_meanval']*1000.0, c=colors[i], s=10, label=groups_names[i])
    ax.hist(dfi['cluster_meanval']*1000.0, color=colors[i], label=groups_names[i])
df2 = pd.DataFrame(df_cluster, columns=['vr', 'cluster_meanval'])
print df2.corr()
#plt.xlim([0, 50000])

    #ax.text(30000, 0.92, 'corr. coeff. (right): %.3f'%df2.corr()['cluster_meanval'][0], fontsize=10)
plt.legend(loc='upper left')
plt.show()


                       vr  cluster_meanval
vr               1.000000         0.554056
cluster_meanval  0.554056         1.000000

In [ ]: